Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Issue 5854: Enable + disable of options doesn't always take effect

  • Loading branch information...
commit 3beb0c78cde97ba1ac6be42f28669bd92506eef6 1 parent 4c68782
@simonlindholm simonlindholm authored
View
17 extension/content/firebug/chrome/reps.js
@@ -285,6 +285,7 @@ FirebugReps.Func = domplate(Firebug.Rep,
var monitored = scriptInfo ? FBS.fbs.isMonitored(scriptInfo.sourceFile.href,
scriptInfo.lineNo) : false;
+ var self = this;
var name = script ? StackFrame.getFunctionName(script, context) : fn.name;
return [
{
@@ -293,7 +294,11 @@ FirebugReps.Func = domplate(Firebug.Rep,
nol10n: true,
type: "checkbox",
checked: monitored,
- command: Obj.bindFixed(this.monitor, this, fn, monitored)
+ command: function()
+ {
+ var checked = this.hasAttribute("checked");
+ self.monitor(fn, !checked);
+ }
},
"-",
{
@@ -1107,7 +1112,6 @@ FirebugReps.Element = domplate(Firebug.Rep,
getContextMenuItems: function(elt, target, context)
{
var type;
- var monitored = EventMonitor.areEventsMonitored(elt, null, context);
var items = [];
if (Xml.isElementHTML(elt) || Xml.isElementXHTML(elt))
@@ -1173,9 +1177,12 @@ FirebugReps.Element = domplate(Firebug.Rep,
tooltiptext: "html.tip.Show_Events_In_Console",
id: "fbShowEventsInConsole",
type: "checkbox",
- checked: monitored,
- command: Obj.bindFixed(EventMonitor.toggleMonitorEvents,
- EventMonitor, elt, null, monitored, context)
+ checked: EventMonitor.areEventsMonitored(elt, null, context),
+ command: function()
+ {
+ var checked = this.hasAttribute("checked");
+ EventMonitor.toggleMonitorEvents(elt, null, !checked, context);
+ }
},
"-",
{
View
7 extension/content/firebug/console/consolePanel.js
@@ -294,8 +294,11 @@ Firebug.ConsolePanel.prototype = Obj.extend(Firebug.ActivablePanel,
type: "checkbox",
checked: strictValue,
tooltiptext: "console.option.tip.Show_Strict_Warnings",
- command: Obj.bindFixed(Options.setPref, Options,
- strictDomain, strictName, !strictValue)
+ command: function()
+ {
+ var checked = this.hasAttribute("checked");
+ Options.setPref(strictDomain, strictName, checked);
+ }
};
},
View
8 extension/content/firebug/cookies/menuUtils.js
@@ -13,13 +13,17 @@ var MenuUtils =
{
optionMenu: function(context, label, tooltiptext, domain, option)
{
- var value = Options.getPref(domain, option);
+ var value = Options.getPref(domain, option), self = this;
return {
label: label,
tooltiptext: tooltiptext,
type: "checkbox",
checked: value,
- command: Obj.bindFixed(this.setPref, this, domain, option, !value)
+ command: function()
+ {
+ var checked = this.hasAttribute("checked");
+ self.setPref(domain, option, checked);
+ }
};
},
View
12 extension/content/firebug/js/scriptPanel.js
@@ -1376,8 +1376,14 @@ Firebug.ScriptPanel.prototype = Obj.extend(Firebug.SourceBoxPanel,
optionMenu: function(label, option)
{
var checked = Firebug.Options.get(option);
- return {label: label, type: "checkbox", checked: checked,
- command: Obj.bindFixed(Firebug.Options.set, Firebug, option, !checked) };
+ return {
+ label: label, type: "checkbox", checked: checked,
+ command: function()
+ {
+ var checked = this.hasAttribute("checked");
+ Firebug.Options.set(option, checked)
+ }
+ };
},
getContextMenuItems: function(fn, target)
@@ -1970,4 +1976,4 @@ Firebug.registerPanel(Firebug.ScriptPanel);
return Firebug.ScriptPanel;
// ********************************************************************************************* //
-});
+});
View
2  extension/content/firebug/net/netPanel.js
@@ -312,7 +312,7 @@ NetPanel.prototype = Obj.extend(Firebug.ActivablePanel,
tooltiptext: "net.option.tip.Disable_Browser_Cache",
command: function()
{
- BrowserCache.toggle(!this.getAttribute("checked"));
+ BrowserCache.toggle(!this.hasAttribute("checked"));
}
};
},
Please sign in to comment.
Something went wrong with that request. Please try again.