Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Display proper error message when CSS selector fails + remove 'select…

…bug' from the code (related to issue 5931)
  • Loading branch information...
commit e84ed5feecc42ad6f2128d927e35776e059256e8 1 parent 6b59070
@janodvarko janodvarko authored
View
20 extension/content/firebug/css/selectorPanel.js
@@ -360,24 +360,34 @@ var SelectorTemplate = domplate(BaseRep,
var WarningTemplate = domplate(Firebug.Rep,
{
noSelectionTag:
- TR({"class": "selectbugWarning "},
+ TR({"class": "selectorWarning"},
TD({"class": "selectionElement"}, Locale.$STR("css.selector.noSelection"))
),
noSelectionResultsTag:
- TR({"class": "selectbugWarning "},
+ TR({"class": "selectorWarning"},
TD({"class": "selectionElement"}, Locale.$STR("css.selector.noSelectionResults"))
),
selectErrorTag:
- TR({"class": "selectbugWarning"},
+ TR({"class": "selectorWarning"},
TD({"class": "selectionElement"}, Locale.$STR("css.selector.selectorError"))
),
selectErrorTextTag:
- TR({"class": "selectbugWarning"},
- TD({"class": "selectionErrorText selectionElement"}, SPAN("$object"))
+ TR({"class": "selectorWarning"},
+ TD({"class": "selectionErrorText selectionElement"},
+ SPAN("$object|getErrorMessage")
+ )
),
+
+ getErrorMessage: function(object)
+ {
+ if (object.message)
+ return object.message;
+
+ return Locale.$STR("css.selector.unknownErrorMessage");
+ }
});
// ********************************************************************************************* //
View
4 extension/locale/en-US/firebug.properties
@@ -1674,3 +1674,7 @@ css.selector.Selection=Selection
panel.tip.selector=Displays elements matching a CSS selector
css.selector.TryASelector=Try a selector...
+# LOCALIZATION NOTE (css.selector.unknownErrorMessage): An error message displayed
+# to the user if querySelectorAll (used by the Selector side panel) fails and there is no
+# explanantion coming from the platform.
+css.selector.unknownErrorMessage=Failed to execute specified selector string
View
7 extension/skin/classic/selector.css
@@ -1,4 +1,5 @@
-/* Rules for selectbug's Selector panel elements */
+/* Rules for Selector panel elements */
+
.cssSelectionTable {
width: 100%;
}
@@ -6,7 +7,7 @@
padding: 0 0 0 1ex;
}
-.selectbugWarning {
+.selectorWarning {
font-size: 11px;
color: gray;
padding: 2px 0 0 1ex;
@@ -18,7 +19,7 @@
background-color: #FFEBEB;
}
-/* Rules for selectbug's effect on CSS stylesheet panel */
+/* Rules for select panel's effect on CSS stylesheet panel */
.selectedSelectorRule {
border-color: Highlight !important;
background-color: #EBF5FF !important;
Please sign in to comment.
Something went wrong with that request. Please try again.