Skip to content

Commit

Permalink
Merge pull request #52 from fflorent/issue5878_pull
Browse files Browse the repository at this point in the history
issue5878: proposal for a command line method: include(url)
  • Loading branch information
janodvarko committed Nov 2, 2012
2 parents c6ec803 + 9c7a1b4 commit 9fd5d83
Show file tree
Hide file tree
Showing 19 changed files with 844 additions and 27 deletions.
13 changes: 9 additions & 4 deletions extension/content/firebug/chrome/tableRep.js
Expand Up @@ -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",
Expand Down Expand Up @@ -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.
Expand All @@ -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");
Expand Down
3 changes: 0 additions & 3 deletions extension/content/firebug/console/commandEditor.js
Expand Up @@ -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]);
Expand Down
9 changes: 6 additions & 3 deletions extension/content/firebug/console/commandLine.js
Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -1507,6 +1509,7 @@ function getNoScript()
return this.noscript;
}


// ********************************************************************************************* //
// Registration

Expand Down

0 comments on commit 9fd5d83

Please sign in to comment.