legacy load jQueryUI as tooltip has wired context problems if loaded as module

This commit is contained in:
Ralf Becker 2021-07-02 08:52:18 +02:00
parent 8133547729
commit b88716c8b6
12 changed files with 33 additions and 64 deletions

View File

@ -9,7 +9,7 @@
*/
import "../../../vendor/bower-asset/jquery/dist/jquery.min.js";
import "../../../vendor/bower-asset/jquery-ui/jquery-ui.js";
//import "../../../vendor/bower-asset/jquery-ui/jquery-ui.js";
import "../jquery/jquery.noconflict.js";
import {egw} from "../jsapi/egw_global.js";

View File

@ -17,7 +17,7 @@
et2_core_valueWidget;
*/
import "../../../vendor/bower-asset/jquery-ui/jquery-ui.js";
//import "../../../vendor/bower-asset/jquery-ui/jquery-ui.js";
import {et2_csvSplit, et2_no_init} from "./et2_core_common";
import {ClassWithAttributes} from "./et2_core_inheritance";
import {et2_createWidget, et2_register_widget, et2_widget, WidgetConfig} from "./et2_core_widget";

View File

@ -503,7 +503,7 @@ export class etemplate2
}
// require necessary translations from server AND the app.js file, if not already loaded
let promisses = [];
let promisses = [window.egw_ready]; // to wait for legacy-loaded JS
if (Array.isArray(_data.langRequire)) {
promisses.push(egw(currentapp, window).langRequire(window, _data.langRequire));
}

View File

@ -19,7 +19,7 @@
import "../../../vendor/bower-asset/jquery/dist/jquery.min.js";
import "../jquery/jquery.noconflict.js";
import "../../../vendor/bower-asset/jquery-ui/jquery-ui.js";
//import "../../../vendor/bower-asset/jquery-ui/jquery-ui.js";
import './fw_base.js';
import './fw_browser.js';
import './fw_ui.js';

View File

@ -15,7 +15,7 @@
import "../../../vendor/bower-asset/jquery/dist/jquery.min.js";
import "../jquery/jquery.noconflict.js";
import "../../../vendor/bower-asset/jquery-ui/jquery-ui.js";
//import "../../../vendor/bower-asset/jquery-ui/jquery-ui.js";
import "../jquery/mousewheel/mousewheel.js";
import '../jsapi/egw_inheritance.js';
import {EGW_KEY_ENTER, EGW_KEY_SPACE} from '../egw_action/egw_action_constants.js';

View File

@ -20,9 +20,9 @@
*/
import "../../../vendor/bower-asset/jquery/dist/jquery.min.js";
import "../../../vendor/bower-asset/jquery-ui/jquery-ui.js";
//import "../../../vendor/bower-asset/jquery-ui/jquery-ui.js";
import "../jquery/jquery.noconflict.js";
import "../jquery/jquery-ui-timepicker-addon.js";
//import "../jquery/jquery-ui-timepicker-addon.js";
import './egw_core.js';
/**

View File

@ -4,7 +4,7 @@
*/
import "../../../vendor/bower-asset/jquery/dist/jquery.min.js";
import "../../../vendor/bower-asset/jquery-ui/jquery-ui.js";
//import "../../../vendor/bower-asset/jquery-ui/jquery-ui.js";
import "../jquery/jquery.noconflict.js";
import "./egw.js";

View File

@ -1072,13 +1072,15 @@ abstract class Framework extends Framework\Extra
'etag' => md5(json_encode($GLOBALS['egw_info']['user']['preferences']['common']).
$GLOBALS['egw']->accounts->json($GLOBALS['egw_info']['user']['account_id'])),
));
// manually load old dhtmlx stuff via script tag
self::includeJS('/api/js/dhtmlxtree/codebase/dhtmlxcommon.js');
self::includeJS('/api/js/dhtmlxMenu/sources/dhtmlxmenu.js');
self::includeJS('/api/js/dhtmlxMenu/sources/ext/dhtmlxmenu_ext.js');
self::includeJS('/api/js/dhtmlxtree/sources/dhtmlxtree.js');
self::includeJS('/api/js/dhtmlxtree/sources/ext/dhtmlxtree_json.js');
}
// manually load old legacy javascript dhtmlx & jQuery-UI via script tag
self::includeJS('/vendor/bower-asset/jquery-ui/jquery-ui.js');
self::includeJS('/api/js/jquery/jquery-ui-timepicker-addon.js');
self::includeJS('/api/js/dhtmlxtree/codebase/dhtmlxcommon.js');
self::includeJS('/api/js/dhtmlxMenu/sources/dhtmlxmenu.js');
self::includeJS('/api/js/dhtmlxMenu/sources/ext/dhtmlxmenu_ext.js');
self::includeJS('/api/js/dhtmlxtree/sources/dhtmlxtree.js');
self::includeJS('/api/js/dhtmlxtree/sources/ext/dhtmlxtree_json.js');
$extra['url'] = $GLOBALS['egw_info']['server']['webserver_url'];
$map = null;

View File

@ -11,7 +11,7 @@
import "../../vendor/bower-asset/jquery/dist/jquery.min.js";
import "../../vendor/bower-asset/jquery-ui/jquery-ui.js";
//import "../../vendor/bower-asset/jquery-ui/jquery-ui.js";
import {EgwApp} from '../../api/js/jsapi/egw_app';
import {egw} from "../../api/js/jsapi/egw_global";

View File

@ -26,7 +26,7 @@ jQuery(function()
else if ((this.href[0] === '/' || this.href.match(new RegExp('^'+location.protocol+'//'+location.host+'/'))) &&
this.href.match(/\/index.php\?/))
{
top.egw.openPopup(this.href.replace(/([?&])no_popup=[^&]*/, '\1'), 800, 600, '_blank');
top.egw.openPopup(this.href.replace(/([?&])no_popup=[^&]*/, '$1'), 800, 600, '_blank');
return false;
}
else // add target=_blank to all other links, gives CSP error and would open in preview

61
package-lock.json generated
View File

@ -9,6 +9,7 @@
"version": "21.1.20210316",
"license": "GPL-2.0",
"devDependencies": {
"@babel/core": "^7.14.6",
"@babel/preset-typescript": "^7.14.5",
"@rollup/plugin-babel": "^5.3.0",
"@rollup/plugin-typescript": "^8.2.1",
@ -42,7 +43,6 @@
"resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.14.7.tgz",
"integrity": "sha512-nS6dZaISCXJ3+518CWiBfEr//gHyMO02uDxBkXTKZDN5POruCnOZ1N4YBRZDCabwF8nZMWBpRxIicmXtBs+fvw==",
"dev": true,
"peer": true,
"engines": {
"node": ">=6.9.0"
}
@ -52,7 +52,6 @@
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.14.6.tgz",
"integrity": "sha512-gJnOEWSqTk96qG5BoIrl5bVtc23DCycmIePPYnamY9RboYdI4nFy5vAQMSl81O5K/W0sLDWfGysnOECC+KUUCA==",
"dev": true,
"peer": true,
"dependencies": {
"@babel/code-frame": "^7.14.5",
"@babel/generator": "^7.14.5",
@ -109,7 +108,6 @@
"resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.14.5.tgz",
"integrity": "sha512-v+QtZqXEiOnpO6EYvlImB6zCD2Lel06RzOPzmkz/D/XgQiUu3C/Jb1LOqSt/AIA34TYi/Q+KlT8vTQrgdxkbLw==",
"dev": true,
"peer": true,
"dependencies": {
"@babel/compat-data": "^7.14.5",
"@babel/helper-validator-option": "^7.14.5",
@ -210,7 +208,6 @@
"resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.14.5.tgz",
"integrity": "sha512-iXpX4KW8LVODuAieD7MzhNjmM6dzYY5tfRqT+R9HDXWl0jPn/djKmA+G9s/2C2T9zggw5tK1QNqZ70USfedOwA==",
"dev": true,
"peer": true,
"dependencies": {
"@babel/helper-module-imports": "^7.14.5",
"@babel/helper-replace-supers": "^7.14.5",
@ -266,7 +263,6 @@
"resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.14.5.tgz",
"integrity": "sha512-nfBN9xvmCt6nrMZjfhkl7i0oTV3yxR4/FztsbOASyTvVcoYd0TRHh7eMLdlEcCqobydC0LAF3LtC92Iwxo0wyw==",
"dev": true,
"peer": true,
"dependencies": {
"@babel/types": "^7.14.5"
},
@ -309,7 +305,6 @@
"resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.14.6.tgz",
"integrity": "sha512-yesp1ENQBiLI+iYHSJdoZKUtRpfTlL1grDIX9NRlAVppljLw/4tTyYupIB7uIYmC3stW/imAv8EqaKaS/ibmeA==",
"dev": true,
"peer": true,
"dependencies": {
"@babel/template": "^7.14.5",
"@babel/traverse": "^7.14.5",
@ -675,7 +670,6 @@
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.6.tgz",
"integrity": "sha512-Wspk/PqO+4W9qp5iUTJsa1B/QrYn1keNCcEP5OvP7WBwT4KaDly0uONYmC6Xa3Z5IqnUgS0KcgLYu1l74x0ZXQ==",
"dev": true,
"peer": true,
"dependencies": {
"caniuse-lite": "^1.0.30001219",
"colorette": "^1.2.2",
@ -705,7 +699,6 @@
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001239.tgz",
"integrity": "sha512-cyBkXJDMeI4wthy8xJ2FvDU6+0dtcZSJW3voUF8+e9f1bBeuvyZfc3PNbkOETyhbR+dGCPzn9E7MA3iwzusOhQ==",
"dev": true,
"peer": true,
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/browserslist"
@ -761,8 +754,7 @@
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/colorette/-/colorette-1.2.2.tgz",
"integrity": "sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w==",
"dev": true,
"peer": true
"dev": true
},
"node_modules/colors": {
"version": "1.1.2",
@ -790,7 +782,6 @@
"resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz",
"integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==",
"dev": true,
"peer": true,
"dependencies": {
"safe-buffer": "~5.1.1"
}
@ -840,15 +831,13 @@
"version": "1.3.756",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.756.tgz",
"integrity": "sha512-WsmJym1TMeHVndjPjczTFbnRR/c4sbzg8fBFtuhlb2Sru3i/S1VGpzDSrv/It8ctMU2bj8G7g7/O3FzYMGw6eA==",
"dev": true,
"peer": true
"dev": true
},
"node_modules/escalade": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz",
"integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==",
"dev": true,
"peer": true,
"engines": {
"node": ">=6"
}
@ -1032,7 +1021,6 @@
"resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz",
"integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==",
"dev": true,
"peer": true,
"engines": {
"node": ">=6.9.0"
}
@ -1610,7 +1598,6 @@
"resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz",
"integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==",
"dev": true,
"peer": true,
"dependencies": {
"minimist": "^1.2.5"
},
@ -1786,8 +1773,7 @@
"version": "1.2.5",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
"integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==",
"dev": true,
"peer": true
"dev": true
},
"node_modules/mkdirp": {
"version": "1.0.4",
@ -1811,8 +1797,7 @@
"version": "1.1.73",
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.73.tgz",
"integrity": "sha512-uW7fodD6pyW2FZNZnp/Z3hvWKeEW1Y8R1+1CnErE8cXFXzl5blBOoVB41CvMer6P6Q0S5FXDwcHgFd1Wj0U9zg==",
"dev": true,
"peer": true
"dev": true
},
"node_modules/nopt": {
"version": "3.0.6",
@ -2139,7 +2124,6 @@
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
"integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
"dev": true,
"peer": true,
"bin": {
"semver": "bin/semver.js"
}
@ -2339,15 +2323,13 @@
"version": "7.14.7",
"resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.14.7.tgz",
"integrity": "sha512-nS6dZaISCXJ3+518CWiBfEr//gHyMO02uDxBkXTKZDN5POruCnOZ1N4YBRZDCabwF8nZMWBpRxIicmXtBs+fvw==",
"dev": true,
"peer": true
"dev": true
},
"@babel/core": {
"version": "7.14.6",
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.14.6.tgz",
"integrity": "sha512-gJnOEWSqTk96qG5BoIrl5bVtc23DCycmIePPYnamY9RboYdI4nFy5vAQMSl81O5K/W0sLDWfGysnOECC+KUUCA==",
"dev": true,
"peer": true,
"requires": {
"@babel/code-frame": "^7.14.5",
"@babel/generator": "^7.14.5",
@ -2391,7 +2373,6 @@
"resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.14.5.tgz",
"integrity": "sha512-v+QtZqXEiOnpO6EYvlImB6zCD2Lel06RzOPzmkz/D/XgQiUu3C/Jb1LOqSt/AIA34TYi/Q+KlT8vTQrgdxkbLw==",
"dev": true,
"peer": true,
"requires": {
"@babel/compat-data": "^7.14.5",
"@babel/helper-validator-option": "^7.14.5",
@ -2465,7 +2446,6 @@
"resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.14.5.tgz",
"integrity": "sha512-iXpX4KW8LVODuAieD7MzhNjmM6dzYY5tfRqT+R9HDXWl0jPn/djKmA+G9s/2C2T9zggw5tK1QNqZ70USfedOwA==",
"dev": true,
"peer": true,
"requires": {
"@babel/helper-module-imports": "^7.14.5",
"@babel/helper-replace-supers": "^7.14.5",
@ -2509,7 +2489,6 @@
"resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.14.5.tgz",
"integrity": "sha512-nfBN9xvmCt6nrMZjfhkl7i0oTV3yxR4/FztsbOASyTvVcoYd0TRHh7eMLdlEcCqobydC0LAF3LtC92Iwxo0wyw==",
"dev": true,
"peer": true,
"requires": {
"@babel/types": "^7.14.5"
}
@ -2540,7 +2519,6 @@
"resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.14.6.tgz",
"integrity": "sha512-yesp1ENQBiLI+iYHSJdoZKUtRpfTlL1grDIX9NRlAVppljLw/4tTyYupIB7uIYmC3stW/imAv8EqaKaS/ibmeA==",
"dev": true,
"peer": true,
"requires": {
"@babel/template": "^7.14.5",
"@babel/traverse": "^7.14.5",
@ -2818,7 +2796,6 @@
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.6.tgz",
"integrity": "sha512-Wspk/PqO+4W9qp5iUTJsa1B/QrYn1keNCcEP5OvP7WBwT4KaDly0uONYmC6Xa3Z5IqnUgS0KcgLYu1l74x0ZXQ==",
"dev": true,
"peer": true,
"requires": {
"caniuse-lite": "^1.0.30001219",
"colorette": "^1.2.2",
@ -2837,8 +2814,7 @@
"version": "1.0.30001239",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001239.tgz",
"integrity": "sha512-cyBkXJDMeI4wthy8xJ2FvDU6+0dtcZSJW3voUF8+e9f1bBeuvyZfc3PNbkOETyhbR+dGCPzn9E7MA3iwzusOhQ==",
"dev": true,
"peer": true
"dev": true
},
"chalk": {
"version": "1.1.3",
@ -2881,8 +2857,7 @@
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/colorette/-/colorette-1.2.2.tgz",
"integrity": "sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w==",
"dev": true,
"peer": true
"dev": true
},
"colors": {
"version": "1.1.2",
@ -2907,7 +2882,6 @@
"resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz",
"integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==",
"dev": true,
"peer": true,
"requires": {
"safe-buffer": "~5.1.1"
}
@ -2943,15 +2917,13 @@
"version": "1.3.756",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.756.tgz",
"integrity": "sha512-WsmJym1TMeHVndjPjczTFbnRR/c4sbzg8fBFtuhlb2Sru3i/S1VGpzDSrv/It8ctMU2bj8G7g7/O3FzYMGw6eA==",
"dev": true,
"peer": true
"dev": true
},
"escalade": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz",
"integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==",
"dev": true,
"peer": true
"dev": true
},
"escape-string-regexp": {
"version": "1.0.5",
@ -3089,8 +3061,7 @@
"version": "1.0.0-beta.2",
"resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz",
"integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==",
"dev": true,
"peer": true
"dev": true
},
"getobject": {
"version": "1.0.1",
@ -3534,7 +3505,6 @@
"resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz",
"integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==",
"dev": true,
"peer": true,
"requires": {
"minimist": "^1.2.5"
}
@ -3672,8 +3642,7 @@
"version": "1.2.5",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
"integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==",
"dev": true,
"peer": true
"dev": true
},
"mkdirp": {
"version": "1.0.4",
@ -3691,8 +3660,7 @@
"version": "1.1.73",
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.73.tgz",
"integrity": "sha512-uW7fodD6pyW2FZNZnp/Z3hvWKeEW1Y8R1+1CnErE8cXFXzl5blBOoVB41CvMer6P6Q0S5FXDwcHgFd1Wj0U9zg==",
"dev": true,
"peer": true
"dev": true
},
"nopt": {
"version": "3.0.6",
@ -3939,8 +3907,7 @@
"version": "6.3.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
"integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
"dev": true,
"peer": true
"dev": true
},
"serialize-javascript": {
"version": "4.0.0",

View File

@ -13,7 +13,7 @@
framework.fw_desktop;
/pixelegg/js/slider.js;
*/
import "../../vendor/bower-asset/jquery-ui/jquery-ui.js";
//import "../../vendor/bower-asset/jquery-ui/jquery-ui.js";
import "../../api/js/jquery/mousewheel/mousewheel.js";
import '../../api/js/framework/fw_desktop.js';
import './slider.js';