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.

[Backport of cfbd0a6 to 10.0]

287063
  • Loading branch information
bschwarzent committed Jan 27, 2021
1 parent 9a46432 commit ccaa828
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
Expand Up @@ -309,16 +309,6 @@ scout.Outline.prototype._initDetailForm = function(node) {
}.bind(this));
};

/**
* @override
*/
scout.Outline.prototype._decorateNode = function(node) {
scout.Outline.parent.prototype._decorateNode.call(this, node);
if (this.session.inspector) {
scout.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
Expand Up @@ -142,6 +142,13 @@ scout.Page.prototype._ensureDetailForm = function() {
this.setDetailForm(form);
};

scout.Page.prototype._decorate = function() {
scout.Page.parent.prototype._decorate.call(this);
if (this.$node && this.session.inspector) {
scout.inspector.applyInfo(this, this.$node);
}
};

// see Java: AbstractPage#pageActivatedNotify
scout.Page.prototype.activate = function() {
this._ensureDetailForm();
Expand Down

0 comments on commit ccaa828

Please sign in to comment.