Skip to content

Commit

Permalink
Merge branch 'issue229' of github.com:firebug/firebug
Browse files Browse the repository at this point in the history
  • Loading branch information
janodvarko committed May 3, 2013
2 parents 1f1316e + 25b1e62 commit e184b85
Show file tree
Hide file tree
Showing 8 changed files with 233 additions and 116 deletions.
11 changes: 8 additions & 3 deletions extension/content/firebug/chrome/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,6 @@ Menu.setItemIntoElement = function(element, item)
if (item.type == "checkbox" && !item.closemenu)
element.setAttribute("closemenu", "none");

if (item.checked)
element.setAttribute("checked", "true");

if (item.disabled)
element.setAttribute("disabled", "true");

Expand Down Expand Up @@ -134,7 +131,15 @@ Menu.setItemIntoElement = function(element, item)
element.setAttribute("name", item.name);

if (item.items && (item.command || item.commandID))
{
element.setAttribute("type", "splitmenu");
element.setAttribute("iconic", "true");
}

// xxxHonza: must be done after 'type' == 'splitmenu' otherwise the menu-item
// is not checked (the check icon is not displayed from some reason).
if (item.checked)
element.setAttribute("checked", "true");

return element;
};
Expand Down
65 changes: 2 additions & 63 deletions extension/content/firebug/chrome/reps.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,13 @@ define([
"firebug/lib/string",
"firebug/lib/xml",
"firebug/dom/toggleBranch",
"firebug/console/eventMonitor",
"firebug/console/closureInspector",
"firebug/chrome/menu",
"arch/compilationunit",
],
function(Obj, Arr, Firebug, Domplate, Firefox, Xpcom, Locale, HTMLLib, Events, Wrapper, Options,
Url, SourceLink, StackFrame, Css, Dom, Win, System, Xpath, Str, Xml, ToggleBranch,
EventMonitor, ClosureInspector, Menu, CompilationUnit) {
ClosureInspector, Menu, CompilationUnit) {

with (Domplate) {

Expand Down Expand Up @@ -1477,21 +1476,8 @@ FirebugReps.Element = domplate(Firebug.Rep,
}
]);
}

items = items.concat([
"-",
{
label: "ShowEventsInConsole",
tooltiptext: "html.tip.Show_Events_In_Console",
id: "fbShowEventsInConsole",
type: "checkbox",
checked: EventMonitor.areEventsMonitored(elt, null, context),
command: function()
{
var checked = this.hasAttribute("checked");
EventMonitor.toggleMonitorEvents(elt, null, !checked, context);
}
},
"-",
{
label: "ScrollIntoView",
Expand Down Expand Up @@ -1972,52 +1958,6 @@ FirebugReps.Event = domplate(Firebug.Rep,

// ********************************************************************************************* //

FirebugReps.EventLog = domplate(FirebugReps.Event,
{
className: "eventLog",

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

tag:
TAG("$copyEventTag", {object: "$object|copyEvent"}),

copyEventTag:
SPAN(
OBJECTLINK("$object|summarizeEvent"),
SPAN("&nbsp"),
SPAN("»"),
SPAN("&nbsp"),
TAG("$object|getTargetTag", {object: "$object|getTarget"})
),

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

copyEvent: function(log)
{
return new Dom.EventCopy(log.event);
},

getTarget: function(event)
{
return event.target;
},

getTargetTag: function(event)
{
var rep = Firebug.getRep(event.target);
return rep.shortTag ? rep.shortTag : rep.tag;
},

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

supportsObject: function(object, type)
{
return object instanceof EventMonitor.EventLog;
},
});

// ********************************************************************************************* //

FirebugReps.SourceLink = domplate(Firebug.Rep,
{
tag:
Expand Down Expand Up @@ -3542,7 +3482,6 @@ Firebug.registerRep(
FirebugReps.Date,
FirebugReps.NamedNodeMap,
FirebugReps.Reference,
FirebugReps.EventLog,
FirebugReps.ClosureScope,
FirebugReps.OptimizedAway
);
Expand Down
1 change: 1 addition & 0 deletions extension/content/firebug/console/console.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ define([
"firebug/console/consolePanel",
"firebug/console/commandEditor",
"firebug/console/functionMonitor",
"firebug/console/eventMonitor",
"firebug/console/performanceTiming",
],
function(Obj, Firebug, Firefox, Events, Win, Search, Xml, Options) {
Expand Down
Loading

0 comments on commit e184b85

Please sign in to comment.