Skip to content

Commit b0e51c8

Browse files
author
Chris K
committed
Make window and document clickable too.
1 parent 908dfe6 commit b0e51c8

File tree

5 files changed

+31
-10
lines changed

5 files changed

+31
-10
lines changed

src/build-application/build_application.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ window.app.build_application = function(on_services_created, on_services_enabled
182182

183183
var report_usage = function()
184184
{
185-
if (settings.general.get("track-usage"))
185+
if (settings.general.get("track-usage") && !location.port)
186186
{
187187
var trackerurl = "/app/user-count"
188188
var tracker = new cls.UserTracker(trackerurl);

src/ecma-debugger/dominspection/templates.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,8 +275,10 @@
275275
case DOCUMENT_NODE:
276276
{
277277
if (ev_listener)
278-
tree += "<div class='search-match dom-search document' " +
279-
"obj-id='" + node[ID] + "'>" +
278+
tree += "<div class='search-match dom-search document' " +
279+
"rt-id='" + String(model.getDataRuntimeId()) + "' " +
280+
"obj-id='" + String(node[ID]) + "' " +
281+
"handler='inspect-object-link' >" +
280282
"document" + ev_listener + "</div>";
281283
break;
282284
}

src/ecma-debugger/eventlisteners/evlisteners.css

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
.ev-all
2+
{
3+
margin-top: 5px;
4+
}
5+
6+
.ev-rt-list
7+
{
8+
margin: 0 3px;
9+
}
10+
111
.ev-listener-type
212
{
313
font: inherit;
@@ -21,7 +31,7 @@
2131

2232
.ev-all-listeners
2333
{
24-
margin-left: 22px;
34+
margin-left: 12px;
2535
}
2636

2737
.tooltip-function-source .js-tooltip-examine-container

src/ecma-debugger/eventlisteners/evlistenertemplates.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// TODO clean up the order an the names
44
this.main_ev_listener_view = function(data)
55
{
6+
var data_with_ls = data.filter(function(rt_l) { return rt_l.event_names.length; });
67
return (
78
["div",
89
["div",
@@ -12,7 +13,7 @@
1213
"unselectable", "on",
1314
"tabindex", "1",
1415
"handler", "update-ev-listeners"]],
15-
["ul", data.map(this._ev_names_list, this)],
16+
["ul", data_with_ls.map(this._ev_names_list, this), "class", "ev-all"],
1617
"class", "main-ev-listener-view js-search-results-runtime padding"]);
1718
};
1819

@@ -30,7 +31,8 @@
3031
}
3132
ret.push(["ul", ev_obj.event_names.map(this._ev_name_item, this),
3233
"data-rt-id", String(ev_obj.rt_id),
33-
"data-obj-id", String(ev_obj.obj_id)]);
34+
"data-obj-id", String(ev_obj.obj_id),
35+
"class", "ev-rt-list"]);
3436
return ret;
3537
};
3638

@@ -72,7 +74,11 @@
7274
["span", "class", "node-with-ev-listener",
7375
"data-tooltip", "event-listener"],
7476
"data-model-id", String(model.id),
75-
"data-window-id", String(win_listeners.win_id)];
77+
"data-window-id", String(win_listeners.win_id),
78+
"data-rt-id", String(ev_name_object.rt_id),
79+
"data-obj-id", String(win_listeners.win_id),
80+
"class", "search-match",
81+
"handler", "inspect-object-link"];
7682
}
7783
return ret;
7884
};

src/ecma-debugger/objectinspection.6.0/actions.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,12 @@
166166

167167
window.eventHandlers.click['inspect-object-link'] = function(event, target)
168168
{
169-
var rt_id = parseInt(target.getAttribute('rt-id'));
170-
var obj_id = parseInt(target.getAttribute('obj-id'));
171-
_inspect_object(rt_id, obj_id, true);
169+
var rt_id = Number(target.get_ancestor_attr('rt-id') ||
170+
target.get_ancestor_attr('data-rt-id'));
171+
var obj_id = Number(target.get_ancestor_attr('obj-id') ||
172+
target.get_ancestor_attr('data-obj-id'));
173+
if (rt_id && obj_id)
174+
_inspect_object(rt_id, obj_id, true);
172175
};
173176

174177
window.eventHandlers.click['inspect-object-inline-link'] = function(event, target)

0 commit comments

Comments
 (0)