Opened 14 years ago

Closed 14 years ago

#6290 closed enhancement (wontfix)

Click on Firebug Lite commands and auto-fill the command line (patch attached)

Reported by: ptwobrussell Owned by: Mike Wilcox
Priority: high Milestone: 1.2
Component: Core Version: 1.0
Keywords: Cc: [email protected]
Blocked By: Blocking:

Description (last modified by Mike Wilcox)

I frequently mistype commands, and it's annoying to go back and retype them when it's all because of one little typo. Since Firebug Lite doesn't offer any concessions for these kinds of goofs, I quickly threw together this patch that allows you to click on a previous command have it fill into the command line for you. Storing a complete history and using the up and down arrows to navigate it would probably be better, but this is a start anyway.

Could you take a look at this short patch and see what you think. Seems simple enough. Or, if we want to axe that dojo.connect, I imagine we could push it back to Firebug instead keeping it in house...

And just as I was typing this, sfoster said that you (pottedmeat) may have already done something more elaborate?

BTW, I need to get a CLA on file...I'll work on that in the meantime.

Index: firebug.js
--- firebug.js	(revision 13174)
+++ firebug.js	(working copy)
@@ -516,7 +516,19 @@
 	function writeRow(message, className){
 		var row = consoleBody.ownerDocument.createElement("div");
 		row.className = "logRow" + (className ? " logRow-"+className : "");
-		row.innerHTML = message.join("");
+        if (className=="command") {
+            var link = consoleBody.ownerDocument.createElement("a");
+            link.href="#";
+            dojo.connect(link, "onclick", function() {
+                commandLine.value = message[1];
+            });
+            link.innerHTML = message.join("");
+            row.appendChild(link);
+        }
+        else {
+		    row.innerHTML = message.join("");
+        }

Change History (6)

comment:1 Changed 14 years ago by ptwobrussell

Ok, CLA was just sent in a few moments ago.

comment:2 Changed 14 years ago by ptwobrussell

Cc: [email protected] added

comment:3 Changed 14 years ago by bill

Milestone: 1.2

Setting milestone (temporarily?) to 1.2 so it doesn't show up on 1.1 queue.

comment:4 Changed 14 years ago by Neil Roberts

up/down arrow completion has already been committed earlier

comment:5 Changed 14 years ago by Mike Wilcox

Description: modified (diff)
Owner: changed from Neil Roberts to Mike Wilcox

comment:6 Changed 14 years ago by Mike Wilcox

Resolution: wontfix
Status: newclosed

This is in fact a duplicate request. Closing.

Note: See TracTickets for help on using tickets.