@eclipse-scout/core 22.0.29 → 22.0.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/eclipse-scout-core-0c86d1e671be93def26c.min.js +2 -0
- package/dist/eclipse-scout-core-0c86d1e671be93def26c.min.js.map +1 -0
- package/dist/eclipse-scout-core-theme-dark-17a1d77d53510e113a3c.min.css +1 -0
- package/dist/eclipse-scout-core-theme-dark.css +29 -4
- package/dist/eclipse-scout-core-theme-dark.css.map +1 -1
- package/dist/eclipse-scout-core-theme-dfed415a6b7fb17f3f4c.min.css +1 -0
- package/dist/eclipse-scout-core-theme.css +29 -4
- package/dist/eclipse-scout-core-theme.css.map +1 -1
- package/dist/eclipse-scout-core.js +8262 -26896
- package/dist/eclipse-scout-core.js.map +1 -1
- package/dist/file-list +4 -4
- package/package.json +2 -2
- package/src/App.js +31 -23
- package/src/ErrorHandler.js +3 -2
- package/src/RemoteApp.js +6 -13
- package/src/desktop/outline/Outline.js +3 -2
- package/src/desktop/outline/Outline.less +1 -0
- package/src/desktop/outline/OutlineLayout.js +1 -1
- package/src/desktop/outline/PageLayout.js +5 -2
- package/src/keystroke/KeyStroke.js +23 -18
- package/src/layout/graphics.js +15 -1
- package/src/main.less +1 -0
- package/src/popup/Popup.js +94 -15
- package/src/popup/Popup.less +6 -2
- package/src/session/Session.js +10 -5
- package/src/style/sizes.less +2 -0
- package/src/table/TableFooter.js +4 -4
- package/src/table/TableFooter.less +2 -2
- package/src/table/controls/TableControl.js +8 -3
- package/src/table/keystrokes/AbstractTableNavigationKeyStroke.js +1 -1
- package/src/tile/TileGrid.js +2 -1
- package/src/tree/Tree.js +46 -5
- package/src/tree/Tree.less +3 -1
- package/src/tree/TreeNode.js +4 -3
- package/dist/eclipse-scout-core-111d2d090dfd2183238f.min.js +0 -2
- package/dist/eclipse-scout-core-111d2d090dfd2183238f.min.js.map +0 -1
- package/dist/eclipse-scout-core-theme-dark-fd0e080c10f65e67b68b.min.css +0 -1
- package/dist/eclipse-scout-core-theme-f3a61fbc12acf8e27fcc.min.css +0 -1
package/dist/file-list
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
eclipse-scout-core-
|
|
2
|
-
eclipse-scout-core-
|
|
3
|
-
eclipse-scout-core-theme-dark-
|
|
1
|
+
eclipse-scout-core-0c86d1e671be93def26c.min.js
|
|
2
|
+
eclipse-scout-core-0c86d1e671be93def26c.min.js.map
|
|
3
|
+
eclipse-scout-core-theme-dark-17a1d77d53510e113a3c.min.css
|
|
4
4
|
eclipse-scout-core-theme-dark.css
|
|
5
5
|
eclipse-scout-core-theme-dark.css.map
|
|
6
|
-
eclipse-scout-core-theme-
|
|
6
|
+
eclipse-scout-core-theme-dfed415a6b7fb17f3f4c.min.css
|
|
7
7
|
eclipse-scout-core-theme.css
|
|
8
8
|
eclipse-scout-core-theme.css.map
|
|
9
9
|
eclipse-scout-core.js
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eclipse-scout/core",
|
|
3
|
-
"version": "22.0.
|
|
3
|
+
"version": "22.0.34",
|
|
4
4
|
"description": "Eclipse Scout runtime",
|
|
5
5
|
"author": "BSI Business Systems Integration AG",
|
|
6
6
|
"homepage": "https://www.eclipse.org/scout",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"src"
|
|
27
27
|
],
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@eclipse-scout/cli": "22.0.
|
|
29
|
+
"@eclipse-scout/cli": "22.0.34",
|
|
30
30
|
"@eclipse-scout/releng": "^22.0.0",
|
|
31
31
|
"jasmine-core": "3.10.1",
|
|
32
32
|
"jasmine-ajax": "4.0.0",
|
package/src/App.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* All rights reserved. This program and the accompanying materials
|
|
4
4
|
* are made available under the terms of the Eclipse Public License v1.0
|
|
5
5
|
* which accompanies this distribution, and is available at
|
|
6
|
-
*
|
|
6
|
+
* https://www.eclipse.org/legal/epl-v10.html
|
|
7
7
|
*
|
|
8
8
|
* Contributors:
|
|
9
9
|
* BSI Business Systems Integration AG - initial API and implementation
|
|
@@ -341,8 +341,9 @@ export default class App {
|
|
|
341
341
|
// Bluebird has a polyfill -> can it be ported to jQuery?
|
|
342
342
|
}
|
|
343
343
|
|
|
344
|
-
_createErrorHandler() {
|
|
345
|
-
|
|
344
|
+
_createErrorHandler(opts) {
|
|
345
|
+
opts = $.extend({}, opts);
|
|
346
|
+
return scout.create('ErrorHandler', opts);
|
|
346
347
|
}
|
|
347
348
|
|
|
348
349
|
/**
|
|
@@ -459,16 +460,33 @@ export default class App {
|
|
|
459
460
|
$.log.error('App initialization failed.');
|
|
460
461
|
this.setLoading(false);
|
|
461
462
|
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
463
|
+
let promises = [];
|
|
464
|
+
if (this.sessions.length === 0) {
|
|
465
|
+
promises.push(this.errorHandler.handle(error, ...args)
|
|
466
|
+
.then(errorInfo => {
|
|
467
|
+
this._appendStartupError($('body'), errorInfo.message);
|
|
468
|
+
}));
|
|
469
|
+
} else {
|
|
470
|
+
// Session.js may already display a fatal message box
|
|
471
|
+
// -> don't handle the error again and display multiple error messages
|
|
472
|
+
this.sessions
|
|
473
|
+
.filter(session => !session.ready && !session.isFatalMessageShown())
|
|
474
|
+
.forEach(session => {
|
|
475
|
+
session.$entryPoint.empty();
|
|
476
|
+
promises.push(this._createErrorHandler({session: session}).handle(error));
|
|
477
|
+
});
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
// Reject with original rejection arguments
|
|
481
|
+
return $.promiseAll(promises).then(errorInfo => $.rejectedPromise(error, ...args));
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
_appendStartupError($parent, message) {
|
|
485
|
+
let $error = $parent.appendDiv('startup-error');
|
|
486
|
+
$error.appendDiv('startup-error-title').text('The application could not be started');
|
|
487
|
+
if (message) {
|
|
488
|
+
$error.appendDiv('startup-error-message').text(message);
|
|
489
|
+
}
|
|
472
490
|
}
|
|
473
491
|
|
|
474
492
|
/**
|
|
@@ -517,13 +535,3 @@ export default class App {
|
|
|
517
535
|
return this.events.when(type);
|
|
518
536
|
}
|
|
519
537
|
}
|
|
520
|
-
/*
|
|
521
|
-
* Copyright (c) 2010-2019 BSI Business Systems Integration AG.
|
|
522
|
-
* All rights reserved. This program and the accompanying materials
|
|
523
|
-
* are made available under the terms of the Eclipse Public License v1.0
|
|
524
|
-
* which accompanies this distribution, and is available at
|
|
525
|
-
* http://www.eclipse.org/legal/epl-v10.html
|
|
526
|
-
*
|
|
527
|
-
* Contributors:
|
|
528
|
-
* BSI Business Systems Integration AG - initial API and implementation
|
|
529
|
-
*/
|
package/src/ErrorHandler.js
CHANGED
|
@@ -19,6 +19,7 @@ export default class ErrorHandler {
|
|
|
19
19
|
this.displayError = true;
|
|
20
20
|
this.sendError = false;
|
|
21
21
|
this.windowErrorHandler = this._onWindowError.bind(this);
|
|
22
|
+
this.session = null;
|
|
22
23
|
}
|
|
23
24
|
|
|
24
25
|
/**
|
|
@@ -264,8 +265,8 @@ export default class ErrorHandler {
|
|
|
264
265
|
// Note: The error handler is installed globally and we cannot tell in which scout session the error happened.
|
|
265
266
|
// We simply use the first scout session to display the message box and log the error. This is not ideal in the
|
|
266
267
|
// multi-session-case (portlet), but currently there is no other way. Besides, this feature is not in use yet.
|
|
267
|
-
|
|
268
|
-
|
|
268
|
+
let session = this.session || App.get().sessions[0];
|
|
269
|
+
if (session) {
|
|
269
270
|
if (this.displayError && errorInfo.level === logging.Level.ERROR) {
|
|
270
271
|
this._showMessageBox(session, errorInfo.message, errorInfo.code, errorInfo.log);
|
|
271
272
|
}
|
package/src/RemoteApp.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) 2010-2022 BSI Business Systems Integration AG.
|
|
3
3
|
* All rights reserved. This program and the accompanying materials
|
|
4
4
|
* are made available under the terms of the Eclipse Public License v1.0
|
|
5
5
|
* which accompanies this distribution, and is available at
|
|
6
|
-
*
|
|
6
|
+
* https://www.eclipse.org/legal/epl-v10.html
|
|
7
7
|
*
|
|
8
8
|
* Contributors:
|
|
9
9
|
* BSI Business Systems Integration AG - initial API and implementation
|
|
@@ -31,10 +31,11 @@ export default class RemoteApp extends App {
|
|
|
31
31
|
defaultValues.bootstrap();
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
_createErrorHandler() {
|
|
35
|
-
|
|
34
|
+
_createErrorHandler(opts) {
|
|
35
|
+
opts = $.extend({
|
|
36
36
|
sendError: true
|
|
37
|
-
});
|
|
37
|
+
}, opts);
|
|
38
|
+
return super._createErrorHandler(opts);
|
|
38
39
|
}
|
|
39
40
|
|
|
40
41
|
/**
|
|
@@ -47,12 +48,4 @@ export default class RemoteApp extends App {
|
|
|
47
48
|
App.get().sessions.push(session);
|
|
48
49
|
return session.start();
|
|
49
50
|
}
|
|
50
|
-
|
|
51
|
-
_fail(options, error, ...args) {
|
|
52
|
-
$.log.error('App initialization failed', error);
|
|
53
|
-
this.setLoading(false);
|
|
54
|
-
// Session.js already handled the error -> don't show a message here
|
|
55
|
-
// Reject with original rejection arguments
|
|
56
|
-
return $.rejectedPromise(error, ...args);
|
|
57
|
-
}
|
|
58
51
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2010-
|
|
2
|
+
* Copyright (c) 2010-2022 BSI Business Systems Integration AG.
|
|
3
3
|
* All rights reserved. This program and the accompanying materials
|
|
4
4
|
* are made available under the terms of the Eclipse Public License v1.0
|
|
5
5
|
* which accompanies this distribution, and is available at
|
|
6
|
-
*
|
|
6
|
+
* https://www.eclipse.org/legal/epl-v10.html
|
|
7
7
|
*
|
|
8
8
|
* Contributors:
|
|
9
9
|
* BSI Business Systems Integration AG - initial API and implementation
|
|
@@ -482,6 +482,7 @@ export default class Outline extends Tree {
|
|
|
482
482
|
}
|
|
483
483
|
this._setProperty('defaultDetailForm', defaultDetailForm);
|
|
484
484
|
if (this.defaultDetailForm) {
|
|
485
|
+
this.defaultDetailForm.setClosable(false);
|
|
485
486
|
this.defaultDetailForm.detailForm = true;
|
|
486
487
|
}
|
|
487
488
|
if (this.initialized) {
|
|
@@ -322,6 +322,7 @@
|
|
|
322
322
|
&.selected {
|
|
323
323
|
display: flex;
|
|
324
324
|
flex-wrap: wrap; // Move detail menubar to next line
|
|
325
|
+
background-clip: content-box; // selection background shines through on the bottom of the node sometimes when zoomed -> makes it slightly better
|
|
325
326
|
}
|
|
326
327
|
|
|
327
328
|
&.child-of-selected.animate-prev-selected {
|
|
@@ -23,7 +23,7 @@ export default class OutlineLayout extends TreeLayout {
|
|
|
23
23
|
|
|
24
24
|
super._layout($container);
|
|
25
25
|
|
|
26
|
-
containerSize = htmlContainer.availableSize()
|
|
26
|
+
containerSize = htmlContainer.availableSize({exact: true})
|
|
27
27
|
.subtract(htmlContainer.insets());
|
|
28
28
|
|
|
29
29
|
if (this.outline.embedDetailContent) {
|
|
@@ -31,7 +31,7 @@ export default class PageLayout extends AbstractLayout {
|
|
|
31
31
|
detailMenuBarHeight = 0,
|
|
32
32
|
textWidth = 0;
|
|
33
33
|
|
|
34
|
-
containerSize = htmlContainer.availableSize()
|
|
34
|
+
containerSize = htmlContainer.availableSize({exact: true}) // exact is important to calculate text width correctly and to prevent node menubar from wrapping
|
|
35
35
|
.subtract(htmlContainer.insets());
|
|
36
36
|
textWidth = containerSize.width;
|
|
37
37
|
|
|
@@ -93,7 +93,9 @@ export default class PageLayout extends AbstractLayout {
|
|
|
93
93
|
// needs a width to be able to calculate the pref height
|
|
94
94
|
textHeight = graphics.prefSize($text, {
|
|
95
95
|
includeMargin: true,
|
|
96
|
-
widthHint: textWidth
|
|
96
|
+
widthHint: textWidth,
|
|
97
|
+
enforceSizeHints: true,
|
|
98
|
+
exact: true
|
|
97
99
|
}).height;
|
|
98
100
|
|
|
99
101
|
if ($icon.length > 0) {
|
|
@@ -106,6 +108,7 @@ export default class PageLayout extends AbstractLayout {
|
|
|
106
108
|
}
|
|
107
109
|
if (this.outline.detailContent) {
|
|
108
110
|
let htmlDetailContent = this.outline.detailContent.htmlComp;
|
|
111
|
+
options = $.extend({}, options, {enforceSizeHints: true, exact: true});
|
|
109
112
|
detailContentPrefSize = htmlDetailContent.prefSize(options).add(htmlDetailContent.margins());
|
|
110
113
|
}
|
|
111
114
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* Contributors:
|
|
9
9
|
* BSI Business Systems Integration AG - initial API and implementation
|
|
10
10
|
*/
|
|
11
|
-
import {Action, HAlign, Key, keys, scout} from '../index';
|
|
11
|
+
import {Action, HAlign, Key, keys, scout, Widget} from '../index';
|
|
12
12
|
import $ from 'jquery';
|
|
13
13
|
|
|
14
14
|
export default class KeyStroke {
|
|
@@ -134,24 +134,29 @@ export default class KeyStroke {
|
|
|
134
134
|
_isEnabled() {
|
|
135
135
|
// Hint: do not check for which.length because there are keystrokes without a which, e.g. RangeKeyStroke.js
|
|
136
136
|
|
|
137
|
-
if (this.field) {
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
137
|
+
if (!this.field) {
|
|
138
|
+
return true;
|
|
139
|
+
}
|
|
140
|
+
if (this.field instanceof Widget && this.field.isRemovalPending()) {
|
|
141
|
+
// Prevent possible exceptions or unexpected behavior if a keystroke is executed while a widget is being removed.
|
|
142
|
+
return false;
|
|
143
|
+
}
|
|
144
|
+
// Check visibility
|
|
145
|
+
if (this.field.visible !== undefined && !this.field.visible) {
|
|
146
|
+
return false;
|
|
147
|
+
}
|
|
148
|
+
// Check enabled state (if inheritAccessibility is true)
|
|
149
|
+
if (!this.inheritAccessibility) {
|
|
150
|
+
return true;
|
|
151
|
+
}
|
|
152
|
+
if (this.field.enabledComputed !== undefined) {
|
|
153
|
+
return this.field.enabledComputed;
|
|
154
|
+
}
|
|
155
|
+
if (this.field.enabled !== undefined) {
|
|
156
|
+
// This should actually not happen because this.field should always be a widget
|
|
157
|
+
return this.field.enabled;
|
|
153
158
|
}
|
|
154
|
-
return
|
|
159
|
+
return false;
|
|
155
160
|
}
|
|
156
161
|
|
|
157
162
|
/**
|
package/src/layout/graphics.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* Contributors:
|
|
9
9
|
* BSI Business Systems Integration AG - initial API and implementation
|
|
10
10
|
*/
|
|
11
|
-
import {arrays,
|
|
11
|
+
import {arrays, Dimension, Insets, objects, Point, Rectangle, scout, scrollbars} from '../index';
|
|
12
12
|
import $ from 'jquery';
|
|
13
13
|
|
|
14
14
|
/**
|
|
@@ -35,6 +35,10 @@ import $ from 'jquery';
|
|
|
35
35
|
*
|
|
36
36
|
* heightHint undefined Same as 'widthHint' but for the height.
|
|
37
37
|
*
|
|
38
|
+
* enforceSizeHints false Sets min/max-width/height in addition to with width/height if widthHint resp. heightHint is set.
|
|
39
|
+
* The browser sometimes makes the element smaller or larger than specified by width/height, especially in a flex container.
|
|
40
|
+
* To prevent that, set this option to true. Default is false, but may change in the future.
|
|
41
|
+
*
|
|
38
42
|
* restoreScrollPositions true By default, the $elem's scrolling position is saved and restored
|
|
39
43
|
* during the execution of this method (because applying
|
|
40
44
|
* intermediate styles for measurement might change the current
|
|
@@ -96,6 +100,16 @@ export function prefSize($elem, options) {
|
|
|
96
100
|
'width': newWidth,
|
|
97
101
|
'height': newHeight
|
|
98
102
|
};
|
|
103
|
+
if (scout.nvl(options.enforceSizeHints, false)) {
|
|
104
|
+
if (objects.isNumber(newWidth)) {
|
|
105
|
+
cssProperties['max-width'] = newWidth;
|
|
106
|
+
cssProperties['min-width'] = newWidth;
|
|
107
|
+
}
|
|
108
|
+
if (objects.isNumber(newHeight)) {
|
|
109
|
+
cssProperties['max-height'] = newHeight;
|
|
110
|
+
cssProperties['min-height'] = newHeight;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
99
113
|
|
|
100
114
|
// modify properties which prevent reading the preferred size
|
|
101
115
|
$elem.css(cssProperties);
|
package/src/main.less
CHANGED
package/src/popup/Popup.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* All rights reserved. This program and the accompanying materials
|
|
4
4
|
* are made available under the terms of the Eclipse Public License v1.0
|
|
5
5
|
* which accompanies this distribution, and is available at
|
|
6
|
-
*
|
|
6
|
+
* https://www.eclipse.org/legal/epl-v10.html
|
|
7
7
|
*
|
|
8
8
|
* Contributors:
|
|
9
9
|
* BSI Business Systems Integration AG - initial API and implementation
|
|
@@ -29,6 +29,7 @@ export default class Popup extends Widget {
|
|
|
29
29
|
this.windowPaddingX = 10;
|
|
30
30
|
this.windowPaddingY = 5;
|
|
31
31
|
this.withGlassPane = false;
|
|
32
|
+
this._withGlassPane = null;
|
|
32
33
|
this.withFocusContext = true;
|
|
33
34
|
this.initialFocus = () => FocusRule.AUTO;
|
|
34
35
|
this.focusableContainer = false;
|
|
@@ -67,12 +68,19 @@ export default class Popup extends Widget {
|
|
|
67
68
|
// This is necessary because the mousedown listener is attached to the capture phase and therefore executed before any other.
|
|
68
69
|
// If anchor was clicked, popup would already be closed and then opened again -> popup could never be closed by clicking the anchor
|
|
69
70
|
this.closeOnAnchorMouseDown = true;
|
|
71
|
+
this._closeOnAnchorMouseDown = null;
|
|
70
72
|
|
|
71
73
|
// Defines whether the popup should be closed on a mouse click outside of the popup
|
|
72
74
|
this.closeOnMouseDownOutside = true;
|
|
75
|
+
this._closeOnMouseDownOutside = null;
|
|
73
76
|
|
|
74
77
|
// Defines whether the popup should be closed whenever another popup opens.
|
|
75
78
|
this.closeOnOtherPopupOpen = true;
|
|
79
|
+
this._closeOnOtherPopupOpen = null;
|
|
80
|
+
|
|
81
|
+
// Defines whether the popup should behave like a modal form. If true, the properties closeOnAnchorMouseDown, closeOnMouseDownOutside
|
|
82
|
+
// and closeOnOtherPopupOpen ore overruled and set to false. The property withGlassPane is overruled too and set to true.
|
|
83
|
+
this.modal = false;
|
|
76
84
|
|
|
77
85
|
this._openLater = false;
|
|
78
86
|
|
|
@@ -145,10 +153,8 @@ export default class Popup extends Widget {
|
|
|
145
153
|
if (options.location) {
|
|
146
154
|
this.anchorBounds = new Rectangle(options.location.x, options.location.y, 0, 0);
|
|
147
155
|
}
|
|
148
|
-
if (this.withGlassPane) {
|
|
149
|
-
this._glassPaneRenderer = new GlassPaneRenderer(this);
|
|
150
|
-
}
|
|
151
156
|
this._setAnchor(this.anchor);
|
|
157
|
+
this._setModal(this.modal);
|
|
152
158
|
}
|
|
153
159
|
|
|
154
160
|
/**
|
|
@@ -299,6 +305,7 @@ export default class Popup extends Widget {
|
|
|
299
305
|
this._renderWithArrow();
|
|
300
306
|
this._renderWithFocusContext();
|
|
301
307
|
this._renderWithGlassPane();
|
|
308
|
+
this._renderModal();
|
|
302
309
|
}
|
|
303
310
|
|
|
304
311
|
_postRender() {
|
|
@@ -383,9 +390,89 @@ export default class Popup extends Widget {
|
|
|
383
390
|
this.session.focusManager.installFocusContext(this.$container, FocusRule.PREPARE);
|
|
384
391
|
}
|
|
385
392
|
|
|
393
|
+
setModal(modal) {
|
|
394
|
+
this.setProperty('modal', modal);
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
_setModal(modal) {
|
|
398
|
+
this._setProperty('modal', modal);
|
|
399
|
+
if (modal) {
|
|
400
|
+
widgets.preserveAndSetProperty(() => this.setProperty('withGlassPane', true), () => this.withGlassPane, this, '_withGlassPane');
|
|
401
|
+
widgets.preserveAndSetProperty(() => this.setProperty('closeOnAnchorMouseDown', false), () => this.closeOnAnchorMouseDown, this, '_closeOnAnchorMouseDown');
|
|
402
|
+
widgets.preserveAndSetProperty(() => this.setProperty('closeOnMouseDownOutside', false), () => this.closeOnMouseDownOutside, this, '_closeOnMouseDownOutside');
|
|
403
|
+
widgets.preserveAndSetProperty(() => this.setProperty('closeOnOtherPopupOpen', false), () => this.closeOnOtherPopupOpen, this, '_closeOnOtherPopupOpen');
|
|
404
|
+
} else {
|
|
405
|
+
widgets.resetProperty(v => this.setWithGlassPane(v), this, '_withGlassPane');
|
|
406
|
+
widgets.resetProperty(v => this.setCloseOnAnchorMouseDown(v), this, '_closeOnAnchorMouseDown');
|
|
407
|
+
widgets.resetProperty(v => this.setCloseOnMouseDownOutside(v), this, '_closeOnMouseDownOutside');
|
|
408
|
+
widgets.resetProperty(v => this.setCloseOnOtherPopupOpen(v), this, '_closeOnOtherPopupOpen');
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
_renderModal() {
|
|
413
|
+
this.$container.toggleClass('modal', this.modal);
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
setWithGlassPane(withGlassPane) {
|
|
417
|
+
if (!this.modal) {
|
|
418
|
+
this.setProperty('withGlassPane', withGlassPane);
|
|
419
|
+
} else {
|
|
420
|
+
this._withGlassPane = withGlassPane;
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
|
|
386
424
|
_renderWithGlassPane() {
|
|
387
|
-
if (this._glassPaneRenderer) {
|
|
425
|
+
if (this.withGlassPane && !this._glassPaneRenderer) {
|
|
426
|
+
this._glassPaneRenderer = new GlassPaneRenderer(this);
|
|
388
427
|
this._glassPaneRenderer.renderGlassPanes();
|
|
428
|
+
} else if (!this.withGlassPane && this._glassPaneRenderer) {
|
|
429
|
+
this._glassPaneRenderer.removeGlassPanes();
|
|
430
|
+
this._glassPaneRenderer = null;
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
setCloseOnMouseDownOutside(closeOnMouseDownOutside) {
|
|
435
|
+
if (!this.modal) {
|
|
436
|
+
this.setProperty('closeOnMouseDownOutside', closeOnMouseDownOutside);
|
|
437
|
+
} else {
|
|
438
|
+
this._closeOnMouseDownOutside = closeOnMouseDownOutside;
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
_renderCloseOnMouseDownOutside() {
|
|
443
|
+
// The listener needs to be executed in the capturing phase -> prevents that _onDocumentMouseDown will be executed right after the popup gets opened using mouse down, otherwise the popup would be closed immediately
|
|
444
|
+
if (this.closeOnMouseDownOutside && !this._documentMouseDownHandler) {
|
|
445
|
+
this._documentMouseDownHandler = this._onDocumentMouseDown.bind(this);
|
|
446
|
+
this.$container.document(true).addEventListener('mousedown', this._documentMouseDownHandler, true); // true=the event handler is executed in the capturing phase
|
|
447
|
+
} else if (!this.closeOnMouseDownOutside && this._documentMouseDownHandler) {
|
|
448
|
+
this.$container.document(true).removeEventListener('mousedown', this._documentMouseDownHandler, true);
|
|
449
|
+
this._documentMouseDownHandler = null;
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
setCloseOnAnchorMouseDown(closeOnAnchorMouseDown) {
|
|
454
|
+
if (!this.modal) {
|
|
455
|
+
this.setProperty('closeOnAnchorMouseDown', closeOnAnchorMouseDown);
|
|
456
|
+
} else {
|
|
457
|
+
this._closeOnAnchorMouseDown = closeOnAnchorMouseDown;
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
setCloseOnOtherPopupOpen(closeOnOtherPopupOpen) {
|
|
462
|
+
if (!this.modal) {
|
|
463
|
+
this.setProperty('closeOnOtherPopupOpen', closeOnOtherPopupOpen);
|
|
464
|
+
} else {
|
|
465
|
+
this._closeOnOtherPopupOpen = closeOnOtherPopupOpen;
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
_renderCloseOnOtherPopupOpen() {
|
|
470
|
+
if (this.closeOnOtherPopupOpen && !this._popupOpenHandler) {
|
|
471
|
+
this._popupOpenHandler = this._onPopupOpen.bind(this);
|
|
472
|
+
this.session.desktop.on('popupOpen', this._popupOpenHandler);
|
|
473
|
+
} else if (!this.closeOnOtherPopupOpen && this._popupOpenHandler) {
|
|
474
|
+
this.session.desktop.off('popupOpen', this._popupOpenHandler);
|
|
475
|
+
this._popupOpenHandler = null;
|
|
389
476
|
}
|
|
390
477
|
}
|
|
391
478
|
|
|
@@ -482,17 +569,9 @@ export default class Popup extends Widget {
|
|
|
482
569
|
*/
|
|
483
570
|
_attachCloseHandlers() {
|
|
484
571
|
// Install mouse close handler
|
|
485
|
-
|
|
486
|
-
if (this.closeOnMouseDownOutside) {
|
|
487
|
-
this._documentMouseDownHandler = this._onDocumentMouseDown.bind(this);
|
|
488
|
-
this.$container.document(true).addEventListener('mousedown', this._documentMouseDownHandler, true); // true=the event handler is executed in the capturing phase
|
|
489
|
-
}
|
|
490
|
-
|
|
572
|
+
this._renderCloseOnMouseDownOutside();
|
|
491
573
|
// Install popup open close handler
|
|
492
|
-
|
|
493
|
-
this._popupOpenHandler = this._onPopupOpen.bind(this);
|
|
494
|
-
this.session.desktop.on('popupOpen', this._popupOpenHandler);
|
|
495
|
-
}
|
|
574
|
+
this._renderCloseOnOtherPopupOpen();
|
|
496
575
|
}
|
|
497
576
|
|
|
498
577
|
_attachAnchorHandlers() {
|
package/src/popup/Popup.less
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) 2010-2022 BSI Business Systems Integration AG.
|
|
3
3
|
* All rights reserved. This program and the accompanying materials
|
|
4
4
|
* are made available under the terms of the Eclipse Public License v1.0
|
|
5
5
|
* which accompanies this distribution, and is available at
|
|
6
|
-
*
|
|
6
|
+
* https://www.eclipse.org/legal/epl-v10.html
|
|
7
7
|
*
|
|
8
8
|
* Contributors:
|
|
9
9
|
* BSI Business Systems Integration AG - initial API and implementation
|
|
@@ -24,6 +24,10 @@
|
|
|
24
24
|
&.before-animate-open {
|
|
25
25
|
.invisible();
|
|
26
26
|
}
|
|
27
|
+
|
|
28
|
+
&.modal.animate-modality-highlight {
|
|
29
|
+
#scout.animation-shake();
|
|
30
|
+
}
|
|
27
31
|
}
|
|
28
32
|
|
|
29
33
|
.popup-arrow {
|
package/src/session/Session.js
CHANGED
|
@@ -1069,12 +1069,13 @@ export default class Session {
|
|
|
1069
1069
|
* do nothing. Can be used to prevent double messages for the same error.
|
|
1070
1070
|
*/
|
|
1071
1071
|
showFatalMessage(options, errorCode) {
|
|
1072
|
-
if (errorCode) {
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1072
|
+
if (!errorCode) {
|
|
1073
|
+
errorCode = App.get().errorHandler.getJsErrorCode();
|
|
1074
|
+
}
|
|
1075
|
+
if (this._fatalMessagesOnScreen[errorCode]) {
|
|
1076
|
+
return;
|
|
1077
1077
|
}
|
|
1078
|
+
this._fatalMessagesOnScreen[errorCode] = true;
|
|
1078
1079
|
|
|
1079
1080
|
options = options || {};
|
|
1080
1081
|
let model = {
|
|
@@ -1107,6 +1108,10 @@ export default class Session {
|
|
|
1107
1108
|
messageBox.render($entryPoint);
|
|
1108
1109
|
}
|
|
1109
1110
|
|
|
1111
|
+
isFatalMessageShown() {
|
|
1112
|
+
return Object.keys(this._fatalMessagesOnScreen).length > 0;
|
|
1113
|
+
}
|
|
1114
|
+
|
|
1110
1115
|
uploadFiles(target, files, uploadProperties, maxTotalSize, allowedTypes) {
|
|
1111
1116
|
let formData = new FormData(),
|
|
1112
1117
|
acceptedFiles = [];
|
package/src/style/sizes.less
CHANGED
|
@@ -351,6 +351,7 @@
|
|
|
351
351
|
@tooltip-padding-x: 12px;
|
|
352
352
|
@tooltip-padding-y: @context-menu-item-padding-y;
|
|
353
353
|
@tree-node-icon-width: 16px;
|
|
354
|
+
@tree-node-icon-padding-right: 9px;
|
|
354
355
|
@tree-node-bitmap-icon-size: @tree-node-icon-width;
|
|
355
356
|
@tree-node-bitmap-icon-margin-top: -2px;
|
|
356
357
|
@tree-node-checkbox-size: 20px;
|
|
@@ -364,6 +365,7 @@
|
|
|
364
365
|
@tree-node-padding-left: 28px;
|
|
365
366
|
@tree-node-padding-right: 7px;
|
|
366
367
|
@tree-node-padding-y: 7px;
|
|
368
|
+
@tree-node-padding-level-diff-parent-has-icon: @tree-node-icon-width + @tree-node-icon-padding-right;
|
|
367
369
|
@view-tab-key-box-bottom: 9px;
|
|
368
370
|
@view-tab-icon-font-size: 20px;
|
|
369
371
|
@view-tab-selected-width: 56px;
|
package/src/table/TableFooter.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2010-
|
|
2
|
+
* Copyright (c) 2010-2022 BSI Business Systems Integration AG.
|
|
3
3
|
* All rights reserved. This program and the accompanying materials
|
|
4
4
|
* are made available under the terms of the Eclipse Public License v1.0
|
|
5
5
|
* which accompanies this distribution, and is available at
|
|
6
|
-
*
|
|
6
|
+
* https://www.eclipse.org/legal/epl-v10.html
|
|
7
7
|
*
|
|
8
8
|
* Contributors:
|
|
9
9
|
* BSI Business Systems Integration AG - initial API and implementation
|
|
@@ -583,13 +583,13 @@ export default class TableFooter extends Widget {
|
|
|
583
583
|
if (footer.animating) {
|
|
584
584
|
// Layout may be called when container stays open but changes its size using an animation.
|
|
585
585
|
// At that time the controlContainer has not yet the final size, therefore measuring is not possible, but not necessary anyway.
|
|
586
|
-
controlContainerHeight = control.height;
|
|
586
|
+
controlContainerHeight = scout.nvl(control && control.height, controlContainerHeight);
|
|
587
587
|
} else {
|
|
588
588
|
// Measure the real height
|
|
589
589
|
controlContainerHeight = graphics.size(footer.$controlContainer).height;
|
|
590
590
|
// Expand control height? (but only if not resizing)
|
|
591
591
|
if (!footer.resizing && growControl) {
|
|
592
|
-
controlContainerHeight = Math.max(control.height, controlContainerHeight);
|
|
592
|
+
controlContainerHeight = Math.max(control && control.height, controlContainerHeight);
|
|
593
593
|
}
|
|
594
594
|
}
|
|
595
595
|
}
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
left: 0;
|
|
25
25
|
height: 16px;
|
|
26
26
|
cursor: row-resize;
|
|
27
|
-
z-index:
|
|
27
|
+
z-index: 2;
|
|
28
28
|
border-top: @table-control-resize-border-width solid @table-control-resize-border-color;
|
|
29
29
|
}
|
|
30
30
|
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
display: none;
|
|
47
|
-
z-index:
|
|
47
|
+
z-index: 2; // Must not be smaller than z-index of scrollbar, see Table.less
|
|
48
48
|
/* Reset nowrap, forms may have fields which need wrapping (e.g. label field) */
|
|
49
49
|
white-space: normal;
|
|
50
50
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) 2010-2022 BSI Business Systems Integration AG.
|
|
3
3
|
* All rights reserved. This program and the accompanying materials
|
|
4
4
|
* are made available under the terms of the Eclipse Public License v1.0
|
|
5
5
|
* which accompanies this distribution, and is available at
|
|
6
|
-
*
|
|
6
|
+
* https://www.eclipse.org/legal/epl-v10.html
|
|
7
7
|
*
|
|
8
8
|
* Contributors:
|
|
9
9
|
* BSI Business Systems Integration AG - initial API and implementation
|
|
@@ -99,13 +99,18 @@ export default class TableControl extends Action {
|
|
|
99
99
|
/**
|
|
100
100
|
* Renders the content if not already rendered.<br>
|
|
101
101
|
* Opens the container if the container is not already open.<br>
|
|
102
|
-
* Does nothing if the content is not available yet to -> don't open container if content is not rendered yet to prevent blank container or laggy opening
|
|
102
|
+
* Does nothing if the content is not available yet to -> don't open container if content is not rendered yet to prevent blank container or laggy opening.<br>
|
|
103
|
+
* Does nothing if the control is not selected.
|
|
103
104
|
*/
|
|
104
105
|
renderContent() {
|
|
105
106
|
if (!this.contentRendered && !this.isContentAvailable()) {
|
|
106
107
|
return;
|
|
107
108
|
}
|
|
108
109
|
|
|
110
|
+
if (!this.selected) {
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
|
|
109
114
|
if (!this.tableFooter.open) {
|
|
110
115
|
this.tableFooter.openControlContainer(this);
|
|
111
116
|
}
|