Skip to content

Commit

Permalink
Outline: add inspector hints to pages again
Browse files Browse the repository at this point in the history
Some Scout versions ago, the inspector hints were added to the page
so that inspecting the page using browsers dev tool revealed the
model class and class id. This feature broke as the tree node logic
was separated from tree into the class TreeNode without moving
the function responsible for the inspector hints.
  • Loading branch information
cguglielmo committed Jul 17, 2020
1 parent 1f0b98c commit cfbd0a6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
11 changes: 0 additions & 11 deletions eclipse-scout-core/src/desktop/outline/Outline.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import {
Form,
GroupBoxMenuItemsOrder,
HtmlComponent,
inspector,
keyStrokeModifier,
MenuBar,
menus as menus_1,
Expand Down Expand Up @@ -346,16 +345,6 @@ export default class Outline extends Tree {
});
}

/**
* @override
*/
_decorateNode(node) {
super._decorateNode(node);
if (this.session.inspector) {
inspector.applyInfo(node, node.$node);
}
}

// Info: we pass the keyStrokeContext of the parent (table or form) to
// the created buttons, we cannot use keyStrokeContext of the outline
// because that context is disabled when the outline is collapsed. We
Expand Down
12 changes: 11 additions & 1 deletion eclipse-scout-core/src/desktop/outline/pages/Page.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* Contributors:
* BSI Business Systems Integration AG - initial API and implementation
*/
import {icons, MenuBar, Outline, TableRow, TreeNode} from '../../../index';
import {icons, inspector, MenuBar, Outline, TableRow, TreeNode} from '../../../index';
import $ from 'jquery';

/**
Expand Down Expand Up @@ -146,6 +146,16 @@ export default class Page extends TreeNode {
this.setDetailForm(form);
}

/**
* @override
*/
_decorate() {
super._decorate();
if (this.$node && this.session.inspector) {
inspector.applyInfo(this, this.$node);
}
}

// see Java: AbstractPage#pageActivatedNotify
activate() {
this._ensureDetailForm();
Expand Down

0 comments on commit cfbd0a6

Please sign in to comment.