Skip to content

Commit

Permalink
Added hint to filter button tooltips about the shortcut for selecting
Browse files Browse the repository at this point in the history
multiple filters (related to issue 4621 and issue 4156)
  • Loading branch information
SebastianZ committed Jun 17, 2013
1 parent 415f47a commit 9fc93ee
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 0 deletions.
12 changes: 12 additions & 0 deletions extension/content/firebug/console/consolePanel.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -97,6 +97,18 @@ Firebug.ConsolePanel.prototype = Obj.extend(Firebug.ActivablePanel,
if (!this.persistedContent && Firebug.Console.isAlwaysEnabled()) if (!this.persistedContent && Firebug.Console.isAlwaysEnabled())
this.insertLogLimit(this.context); this.insertLogLimit(this.context);


// Initialize filter button tooltips
var doc = this.context.chrome.window.document;
var filterButtons = doc.getElementsByClassName("fbConsoleFilter");
for (var i=0, len=filterButtons.length; i<len; ++i)
{
if (filterButtons[i].id != "fbConsoleFilter-all")
{
filterButtons[i].tooltipText = Locale.$STRF("firebug.labelWithShortcut",
[filterButtons[i].tooltipText, Locale.$STR("tooltip.multipleFiltersHint")]);
}
}

This comment has been minimized.

Copy link
@janodvarko

janodvarko Jun 18, 2013

Member

This way the tooltips are initialized again and again every time the Console panel is created (e.g. refresh).
Couldn't we do it just once somewhere else? (e.g. when console module is initialized?)

Honza

This comment has been minimized.

Copy link
@SebastianZ

SebastianZ Jul 3, 2013

Author Member

For reference, issue 6575 was created to cover that.

Sebastian

// Listen for set filters, so the panel is properly updated when needed // Listen for set filters, so the panel is properly updated when needed
Firebug.Console.addListener(this); Firebug.Console.addListener(this);
}, },
Expand Down
12 changes: 12 additions & 0 deletions extension/content/firebug/net/netPanel.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -85,6 +85,18 @@ NetPanel.prototype = Obj.extend(Firebug.ActivablePanel,


Firebug.ActivablePanel.initialize.apply(this, arguments); Firebug.ActivablePanel.initialize.apply(this, arguments);


// Initialize filter button tooltips
var doc = this.context.chrome.window.document;
var filterButtons = doc.getElementsByClassName("fbNetFilter");
for (var i=0, len=filterButtons.length; i<len; ++i)
{
if (filterButtons[i].id != "fbNetFilter-all")
{
filterButtons[i].tooltipText = Locale.$STRF("firebug.labelWithShortcut",
[filterButtons[i].tooltipText, Locale.$STR("tooltip.multipleFiltersHint")]);
}
}

This comment has been minimized.

Copy link
@janodvarko

janodvarko Jun 18, 2013

Member

The same as above.
Honza

// Listen for set filters, so the panel is properly updated when needed // Listen for set filters, so the panel is properly updated when needed
Firebug.NetMonitor.addListener(this); Firebug.NetMonitor.addListener(this);
}, },
Expand Down
6 changes: 6 additions & 0 deletions extension/locale/en-US/firebug.properties
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -819,6 +819,12 @@ console.Use_Arrow_keys,_Tab_or_Enter=Use Arrow keys, Tab or Enter
# LOCALIZATION NOTE (console.JSDisabledInFirefoxPrefs): Hint shown inside the Console panel in the case # LOCALIZATION NOTE (console.JSDisabledInFirefoxPrefs): Hint shown inside the Console panel in the case
# JavaScript is not available # JavaScript is not available
console.JSDisabledInFirefoxPrefs=JavaScript is disabled in your Firefox preferences. If you want to use the Console panel, then please enable this option via Tools > Options > Content > Enable JavaScript console.JSDisabledInFirefoxPrefs=JavaScript is disabled in your Firefox preferences. If you want to use the Console panel, then please enable this option via Tools > Options > Content > Enable JavaScript

# LOCALIZATION NOTE (tooltip.multipleFiltersHint):
# Hint used for Console and Net panel filter button tooltips describing the shortcut for selecting
# multiple filters
tooltip.multipleFiltersHint=Use Ctrl+Click to select multiple filters

# LOCALIZATION NOTE (console.multiHighlightLimitExceeded): # LOCALIZATION NOTE (console.multiHighlightLimitExceeded):
# Used by the Console panel for arrays. If the user moves the mouse over an array bracket, # Used by the Console panel for arrays. If the user moves the mouse over an array bracket,
# all elements in the array are highlighted on the page. If there are too many elements # all elements in the array are highlighted on the page. If there are too many elements
Expand Down

0 comments on commit 9fc93ee

Please sign in to comment.