Permalink
Browse files

Merge pull request #52 from fflorent/issue5878_pull

issue5878: proposal for a command line method: include(url)
  • Loading branch information...
janodvarko committed Nov 2, 2012
2 parents c6ec803 + 9c7a1b4 commit 9fd5d8370eb0cfd2a7c13ff92bbd61ba3e8d84c6
@@ -19,10 +19,10 @@ with (Domplate) {
FirebugReps.Table = domplate(Firebug.Rep,
{
className: "table",
-
+ tableClassName: "dataTable",
tag:
DIV({"class": "dataTableSizer", "tabindex": "-1" },
- TABLE({"class": "dataTable", cellspacing: 0, cellpadding: 0, width: "100%",
+ TABLE({"class": "$tableClassName", cellspacing: 0, cellpadding: 0, width: "100%",
"role": "grid"},
THEAD({"class": "dataTableThead", "role": "presentation"},
TR({"class": "headerRow focusRow dataTableRow subFocusRow", "role": "row",
@@ -194,7 +194,7 @@ FirebugReps.Table = domplate(Firebug.Rep,
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Console logging
- log: function(data, cols, context)
+ log: function(data, cols, context, object)
{
// No arguments passed into console.table method, bail out for now,
// but some error message could be displayed in the future.
@@ -211,7 +211,12 @@ FirebugReps.Table = domplate(Firebug.Rep,
try
{
this.columns = columns;
- var row = Firebug.Console.log({data: data, columns: columns}, context, "table", this, true);
+
+ var object = object || {};
+ object.data = data;
+ object.columns = columns;
+
+ var row = Firebug.Console.log(object, context, "table", this, true);
// Set vertical height for scroll bar.
var tBody = row.querySelector(".dataTableTbody");
@@ -159,9 +159,6 @@ Firebug.CommandEditor = Obj.extend(Firebug.Module,
var popup = document.getElementById("fbCommandEditorPopup");
Dom.eraseNode(popup);
- var browserWindow = Firebug.chrome.window;
- var commandDispatcher = browserWindow.document.commandDispatcher;
-
var items = Firebug.CommandEditor.getContextMenuItems();
for (var i=0; i<items.length; i++)
Menu.createMenuItem(popup, items[i]);
@@ -21,13 +21,14 @@ define([
"firebug/lib/keywords",
"firebug/console/console",
"firebug/console/commandLineHelp",
+ "firebug/console/commandLineInclude",
"firebug/console/commandLineExposed",
"firebug/console/autoCompleter",
"firebug/console/commandHistory"
],
function(Obj, Firebug, FirebugReps, Locale, Events, Wrapper, Url, Css, Dom, Firefox, Win, System,
Xpath, Str, Xml, Arr, Persist, Keywords, Console, CommandLineHelp,
- CommandLineExposed) {
+ CommandLineInclude, CommandLineExposed) {
// ********************************************************************************************* //
// Constants
@@ -351,7 +352,8 @@ Firebug.CommandLine = Obj.extend(Firebug.Module,
evaluateInWebPage: function(expr, context, targetWindow)
{
- var win = targetWindow || context.window;
+ var win = targetWindow ? targetWindow :
+ (context.baseWindow ? context.baseWindow : context.window);
var element = Dom.addScript(win.document, "_firebugInWebPage", expr);
if (!element)
return;
@@ -1124,7 +1126,7 @@ function FirebugCommandLineAPI(context)
case "node":
XPathResultType = XPathResult.FIRST_ORDERED_NODE_TYPE;
break;
-
+
case "nodes":
XPathResultType = XPathResult.UNORDERED_NODE_ITERATOR_TYPE;
break;
@@ -1507,6 +1509,7 @@ function getNoScript()
return this.noscript;
}
+
// ********************************************************************************************* //
// Registration
Oops, something went wrong.

0 comments on commit 9fd5d83

Please sign in to comment.