[Pkg-mozext-commits] [firexpath] 12/51: Issue 7 Change the name of the extension from FireXPath to FirePath
David Prévot
taffit at moszumanska.debian.org
Sun Mar 22 15:08:51 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository firexpath.
commit 6c08b994dd39efb9cfcb18e1b54727da6c86d8b2
Author: pierre.tholence at gmail.com <pierre.tholence at gmail.com@dfa30af4-1965-11df-8728-136f2c2ca76e>
Date: Sun Sep 12 20:26:37 2010 +0000
Issue 7 Change the name of the extension from FireXPath to FirePath
git-svn-id: http://firepath.googlecode.com/svn/trunk@15 dfa30af4-1965-11df-8728-136f2c2ca76e
---
build.xml | 18 +-
chrome.manifest | 8 +-
content/FirePath.png | Bin 0 -> 5490 bytes
content/{XPathPanel.js => FirePathPanel.js} | 258 ++++++++++-----------
content/FireXPath.png | Bin 2753 -> 0 bytes
content/bindings.xml | 176 +++++++-------
content/firebugOverlay.xul | 22 +-
defaults/preferences/FirePathPref.js | 4 +
defaults/preferences/FireXPathPref.js | 4 -
install.rdf | 6 +-
locale/en-US/FirePath.dtd | 10 +
.../{FireXPath.properties => FirePath.properties} | 2 +-
locale/en-US/FireXPath.dtd | 9 -
logo/FirePath.xcf | Bin 0 -> 7464 bytes
skin/classic/{FireXPath.css => FirePath.css} | 40 ++--
skin/classic/{xPathPanel.css => FirePathPanel.css} | 10 +-
16 files changed, 279 insertions(+), 288 deletions(-)
diff --git a/build.xml b/build.xml
index 8a05d33..b072e93 100644
--- a/build.xml
+++ b/build.xml
@@ -1,19 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- ======================================================================
- 5 mai 2009 16:19:23
-
- FireXPath
- Firebug extension to generate, edit and inspect XPath expressions
-
- Pierre Tholence
- ====================================================================== -->
-<project name="FireXPath" default="xpi">
- <description>
- Firebug extension to generate, edit and inspect XPath expressions
- </description>
+<project name="FirePath" default="xpi">
- <property name="filename" value="FireXPath.xpi"/>
+ <property name="filename" value="FirePath.xpi"/>
<property name="builddir" value="build"/>
<property name="tempdir" value="temp"/>
@@ -25,6 +14,7 @@
<copy todir="${tempdir}">
<fileset dir="." >
<exclude name="${tempdir}"/>
+ <exclude name="logo/**"/>
<exclude name="build.xml"/>
<exclude name=".project"/>
<exclude name="**/.svn"/>
@@ -36,7 +26,7 @@
</target>
<!-- - - - - - - - - - - - - - - - - -
- target: copyFiles
+ target: clean
- - - - - - - - - - - - - - - - - -->
<target name="clean">
<delete dir="${builddir}"/>
diff --git a/chrome.manifest b/chrome.manifest
index 4c87b40..77234bd 100644
--- a/chrome.manifest
+++ b/chrome.manifest
@@ -1,4 +1,4 @@
-content firexpath content/
-locale firexpath en-US locale/en-US/
-skin firexpath classic/1.0 skin/classic/
-overlay chrome://firebug/content/firebugOverlay.xul chrome://firexpath/content/firebugOverlay.xul
+content firepath content/
+locale firepath en-US locale/en-US/
+skin firepath classic/1.0 skin/classic/
+overlay chrome://firebug/content/firebugOverlay.xul chrome://firepath/content/firebugOverlay.xul
diff --git a/content/FirePath.png b/content/FirePath.png
new file mode 100644
index 0000000..155fa2c
Binary files /dev/null and b/content/FirePath.png differ
diff --git a/content/XPathPanel.js b/content/FirePathPanel.js
similarity index 86%
rename from content/XPathPanel.js
rename to content/FirePathPanel.js
index 1586108..986e527 100644
--- a/content/XPathPanel.js
+++ b/content/FirePathPanel.js
@@ -1,20 +1,20 @@
/*
- * Copyright (C) 2009 Pierre Tholence, DB4ALL
+ * Copyright (C) 2009 - 2010 Pierre Tholence
*
- * This file is part of FireXPath
+ * This file is part of FirePath
*
- * FireXPath is free software: you can redistribute it and/or modify
+ * FirePath is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * FireXPath is distributed in the hope that it will be useful,
+ * FirePath is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with FireXPath. If not, see <http://www.gnu.org/licenses/>.
+ * along with FirePath. If not, see <http://www.gnu.org/licenses/>.
*/
FBL.ns(function() { with (FBL) {
@@ -22,7 +22,7 @@ FBL.ns(function() { with (FBL) {
// ************************************************************************************************
// Constants
-const panelName = "xpath";
+const panelName = "firepath";
const prefRegExp = new RegExp(panelName + "\.(.*)");
@@ -108,25 +108,25 @@ var expressionToken = new RegExp("\\]|\\)|\\*" + NameTest + "|" + Literal + "|"
var getNamespace = new RegExp("([^:]+:).*");
// ************************************************************************************************
-// XPathPanel
+// FirePathPanel
-Firebug.XPathPanel = function() {}
-Firebug.XPathPanel.prototype = extend(Firebug.Panel,
+Firebug.FirePathPanel = function() {}
+Firebug.FirePathPanel.prototype = extend(Firebug.Panel,
{
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
// extends Panel ()
name: panelName,
- title: "XPath",
+ title: "FirePath",
initialize: function() {
Firebug.Panel.initialize.apply(this, arguments);
this.addStyleSheet(this.document);
this.location = this.getDefaultLocation(this.context);
- this.xPathBar = (this.context.chrome?this.context.chrome.$("FireXPathBar"): $("FireXPathBar"));
- this.xPathBar.initialize();
- this.xPathStatusBar = (this.context.chrome?this.context.chrome.$("FireXPathStatusBar"): $("FireXPathStatusBar"));
+ this.firePathBar = (this.context.chrome?this.context.chrome.$("FirePathBar"): $("FirePathBar"));
+ this.firePathBar.initialize();
+ this.firePathStatusBar = (this.context.chrome?this.context.chrome.$("FirePathStatusBar"): $("FirePathStatusBar"));
this.ioBoxContainer = this.document.createElement("div");
setClass(this.ioBoxContainer, "io-box-container");
@@ -139,7 +139,7 @@ Firebug.XPathPanel.prototype = extend(Firebug.Panel,
destroy: function(state) {
state.persistedLocation = this.persisteLocation();
- this.xPathBar.persiste(state);
+ this.firePathBar.persiste(state);
this.stopLoading();
if (this.ioBox) {
@@ -165,8 +165,8 @@ Firebug.XPathPanel.prototype = extend(Firebug.Panel,
this.ioBox = new InsideOutBox(this, this.ioBoxContainer);
if(state) {
this.restoreLocation(state.persistedLocation);
- this.xPathBar.restore(state);
- this.xPathBar.evaluate(true);
+ this.firePathBar.restore(state);
+ this.firePathBar.evaluate(true);
} else {
this.ioBox.createObjectBox(this.rootElement || this.location.document);
}
@@ -180,8 +180,8 @@ Firebug.XPathPanel.prototype = extend(Firebug.Panel,
showModules: function(show) {
try {
- this.xPathBar.show(this.context, show);
- this.xPathStatusBar.show(this.context, show);
+ this.firePathBar.show(this.context, show);
+ this.firePathStatusBar.show(this.context, show);
} catch (e) {}
var $ = FBL.$;
@@ -197,19 +197,19 @@ Firebug.XPathPanel.prototype = extend(Firebug.Panel,
detach: function(oldChrome, newChrome) {
Firebug.Panel.detach.apply(this, arguments);
if(this.context == FirebugContext) {
- this.xPathBar.persiste(this.context);
+ this.firePathBar.persiste(this.context);
}
- this.xPathBar = newChrome.$("FireXPathBar");
- this.xPathBar.initialize();
- this.xPathStatusBar = newChrome.$("FireXPathStatusBar");
+ this.firePathBar = newChrome.$("FirePathBar");
+ this.firePathBar.initialize();
+ this.firePathStatusBar = newChrome.$("FirePathStatusBar");
if(this.context == FirebugContext) {
- this.xPathBar.restore(this.context);
- this.xPathBar.currentContext = this.context;
+ this.firePathBar.restore(this.context);
+ this.firePathBar.currentContext = this.context;
}
if(this.context.browser.detached || (newChrome != Firebug.originalChrome && this.context == FirebugContext)) {
- Firebug.XPathPanel.LocationHighlightModule.addLocationListener(newChrome);
+ Firebug.FirePathPanel.LocationHighlightModule.addLocationListener(newChrome);
} else {
- Firebug.XPathPanel.LocationHighlightModule.removeLocationListener(oldChrome);
+ Firebug.FirePathPanel.LocationHighlightModule.removeLocationListener(oldChrome);
}
},
@@ -240,7 +240,7 @@ Firebug.XPathPanel.prototype = extend(Firebug.Panel,
location = object.ownerDocument.defaultView;
this.navigate(location);
- this.xPathBar.setNode(object, this.inspecting);
+ this.firePathBar.setNode(object, this.inspecting);
},
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
@@ -259,8 +259,8 @@ Firebug.XPathPanel.prototype = extend(Firebug.Panel,
},
updateLocation: function() {
- this.xPathBar.updateLocation(this.location);
- this.xPathStatusBar.reset(this.context);
+ this.firePathBar.updateLocation(this.location);
+ this.firePathStatusBar.reset(this.context);
this.setResult(null, null);
},
@@ -315,7 +315,7 @@ Firebug.XPathPanel.prototype = extend(Firebug.Panel,
getOptionsMenuItems: function()
{
return [
- getOptionMenu("showXPathContextMenu", "showXPathContext"),
+ getOptionMenu("showParentToolbar", "showParentToolbar"),
getOptionMenu("generateAbsoluteXPathMenu", "generateAbsoluteXPath"),
getOptionMenu("showDOMMenu", "showDOM")
];
@@ -326,8 +326,8 @@ Firebug.XPathPanel.prototype = extend(Firebug.Panel,
var option = prefRegExp.exec(name)[1];
if(option == "showDOM") {
this.displayResult();
- } else if (option == "showXPathContext") {
- this.xPathBar.showXPathContext(value);
+ } else if (option == "showParentToolbar") {
+ this.firePathBar.showParentToolbar(value);
}
}
},
@@ -337,23 +337,23 @@ Firebug.XPathPanel.prototype = extend(Firebug.Panel,
addStyleSheet: function(doc) {
// Make sure the stylesheet isn't appended twice.
- if ($("xPathStyles", doc))
+ if ($("FirePathStyles", doc))
return;
var styleSheet = createStyleSheet(doc,
- "chrome://firexpath/skin/xPathPanel.css");
- styleSheet.setAttribute("id", "xPathStyles");
+ "chrome://firepath/skin/FirePathPanel.css");
+ styleSheet.setAttribute("id", "FirePathStyles");
addStyleSheet(doc, styleSheet);
},
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
// Result management methods
- setResult: function(xPathContext, result) {
- this.rootElement = xPathContext;
+ setResult: function(parent, result) {
+ this.rootElement = parent;
this.evaluationResult = result;
this.displayResult();
- Firebug.XPathPanel.ResultHighlightModule.refreshHighlight(this);
+ Firebug.FirePathPanel.ResultHighlightModule.refreshHighlight(this);
},
displayResult: function() {
@@ -364,7 +364,7 @@ Firebug.XPathPanel.prototype = extend(Firebug.Panel,
clearNode(this.ioBoxContainer);
delete this.ioBox.rootObjectBox;
- var showDOM = Firebug.getPref(Firebug.prefDomain, "xpath.showDOM")
+ var showDOM = Firebug.getPref(Firebug.prefDomain, "firepath.showDOM")
if(this.evaluationResult != null && !this.evaluationResult.message) {
if(isArray(this.evaluationResult)) {
@@ -386,22 +386,22 @@ Firebug.XPathPanel.prototype = extend(Firebug.Panel,
setResultInfo: function() {
var result = this.evaluationResult;
if(result == null) {
- this.xPathStatusBar.clearResultInfo(this.context);
+ this.firePathStatusBar.clearResultInfo(this.context);
} else if(result.message) {
- this.xPathStatusBar.setResultInfo(this.context, "error", $STR_XP(result.message));
+ this.firePathStatusBar.setResultInfo(this.context, "error", $STR_XP(result.message));
} else {
if(FBL.isArray(result)) {
var whiteSpace = 0;
result.forEach(function(object) {if(isWhitespaceText(object)) whiteSpace++;})
switch(result.length) {
case 0:
- this.xPathStatusBar.setResultInfo(this.context, "warning", $STR_XP("noResultError"));
+ this.firePathStatusBar.setResultInfo(this.context, "warning", $STR_XP("noResultError"));
break;
case 1:
- this.xPathStatusBar.setResultInfo(this.context, "ok", $STR_XP("oneResultMessage"));
+ this.firePathStatusBar.setResultInfo(this.context, "ok", $STR_XP("oneResultMessage"));
break;
default:
- this.xPathStatusBar.setResultInfo(this.context, "ok",
+ this.firePathStatusBar.setResultInfo(this.context, "ok",
$STR_XP("manyResultMessage", result.length) +
(whiteSpace > 0?
" (" + (whiteSpace == 1?
@@ -414,13 +414,13 @@ Firebug.XPathPanel.prototype = extend(Firebug.Panel,
} else {
switch(typeof(result)) {
case "string":
- this.xPathStatusBar.setResultInfo(this.context, "ok", $STR_XP("stringResultMessage"));
+ this.firePathStatusBar.setResultInfo(this.context, "ok", $STR_XP("stringResultMessage"));
break;
case "number":
- this.xPathStatusBar.setResultInfo(this.context, "ok", $STR_XP("numberResultMessage"));
+ this.firePathStatusBar.setResultInfo(this.context, "ok", $STR_XP("numberResultMessage"));
break;
case "boolean":
- this.xPathStatusBar.setResultInfo(this.context, "ok", $STR_XP("booleanResultMessage"));
+ this.firePathStatusBar.setResultInfo(this.context, "ok", $STR_XP("booleanResultMessage"));
break;
}
}
@@ -478,7 +478,7 @@ Firebug.XPathPanel.prototype = extend(Firebug.Panel,
//this.panelNode.removeChild(this.ioBoxContainer);
- this.xPathStatusBar.startLoading(this.context, objects.length);
+ this.firePathStatusBar.startLoading(this.context, objects.length);
this.stepper.start();
},
@@ -490,11 +490,11 @@ Firebug.XPathPanel.prototype = extend(Firebug.Panel,
},
increaseLoading: function() {
- this.xPathStatusBar.increaseLoading(this.context);
+ this.firePathStatusBar.increaseLoading(this.context);
},
finishLoading: function() {
- this.xPathStatusBar.stopLoading(this.context);
+ this.firePathStatusBar.stopLoading(this.context);
//this.panelNode.appendChild(this.ioBoxContainer);
@@ -507,7 +507,7 @@ Firebug.XPathPanel.prototype = extend(Firebug.Panel,
startInspecting: function() {
this.inspecting = true;
this.previousLocation = this.location;
- this.previousXPath = this.xPathBar.selector;
+ this.previousSelector = this.firePathBar.selector;
this.setResult(null, null);
},
@@ -515,12 +515,12 @@ Firebug.XPathPanel.prototype = extend(Firebug.Panel,
this.inspecting = false;
if(cancelled) {
this.navigate(this.previousLocation);
- this.xPathBar.selector = this.previousXPath;
+ this.firePathBar.selector = this.previousSelector;
delete this.previousLocation;
- delete this.previousXPath;
+ delete this.previousSelector;
}
- this.xPathBar.reset();
- this.xPathBar.evaluate();
+ this.firePathBar.reset();
+ this.firePathBar.evaluate();
},
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
@@ -544,12 +544,12 @@ Firebug.XPathPanel.prototype = extend(Firebug.Panel,
// ************************************************************************************************
// Special Reps
-Firebug.XPathPanel.Attr = domplate(Firebug.Rep,
+Firebug.FirePathPanel.Attr = domplate(Firebug.Rep,
{
tag:
SPAN({"class": "nodeAttr", _repObject:"$attr"}, " ",
SPAN({"class": "nodeName"}, "$attr.nodeName"), "="",
- SPAN({"class": "nodeValue"}, "$attr.nodeValue|filterFireXPathClassValue"), """
+ SPAN({"class": "nodeValue"}, "$attr.nodeValue|filterFirePathClassValue"), """
),
className: "attrNode",
@@ -571,7 +571,7 @@ Firebug.XPathPanel.Attr = domplate(Firebug.Rep,
}
});
-Firebug.XPathPanel.Comment = domplate(Firebug.Rep,
+Firebug.FirePathPanel.Comment = domplate(Firebug.Rep,
{
tag:
DIV({"class": "nodeBox", _repObject: "$object"},
@@ -595,7 +595,7 @@ Firebug.XPathPanel.Comment = domplate(Firebug.Rep,
}
});
-Firebug.XPathPanel.CDATASection = domplate(Firebug.Rep,
+Firebug.FirePathPanel.CDATASection = domplate(Firebug.Rep,
{
tag:
DIV({"class": "nodeBox", _repObject: "$object"},
@@ -620,14 +620,14 @@ Firebug.XPathPanel.CDATASection = domplate(Firebug.Rep,
});
Firebug.registerRep(
- Firebug.XPathPanel.Attr,
- Firebug.XPathPanel.Comment,
- Firebug.XPathPanel.CDATASection
+ Firebug.FirePathPanel.Attr,
+ Firebug.FirePathPanel.Comment,
+ Firebug.FirePathPanel.CDATASection
);
// ************************************************************************************************
// Extension of FirebugReps.Element and FirebugReps.TextNode to modify the context menu
-// and tooltip when the xPath tab is selected
+// and tooltip when the FirePath tab is selected
function overwriteMethodForPanel(object, methodName, panelName, newMethod ) {
if(object[methodName] && object[methodName] instanceof Function)
@@ -652,7 +652,7 @@ FirebugReps.Element.getTagName = function(node) {
overwriteMethodForPanel(
FirebugReps.Element,
"getContextMenuItems",
- Firebug.XPathPanel.prototype.name,
+ Firebug.FirePathPanel.prototype.name,
function(node, target, context) {
return getNodeContextMenu(node, target, context);
}
@@ -662,7 +662,7 @@ overwriteMethodForPanel(
overwriteMethodForPanel(
FirebugReps.Element,
"getTooltip",
- Firebug.XPathPanel.prototype.name,
+ Firebug.FirePathPanel.prototype.name,
function(node) {
return getXPathFromNode(node);
}
@@ -672,7 +672,7 @@ overwriteMethodForPanel(
overwriteMethodForPanel(
FirebugReps.TextNode,
"getContextMenuItems",
- Firebug.XPathPanel.prototype.name,
+ Firebug.FirePathPanel.prototype.name,
function(node, target, context) {
return getNodeContextMenu(node, target, context);
}
@@ -682,7 +682,7 @@ overwriteMethodForPanel(
overwriteMethodForPanel(
FirebugReps.TextNode,
"getTooltip",
- Firebug.XPathPanel.prototype.name,
+ Firebug.FirePathPanel.prototype.name,
function(node) {
return getXPathFromNode(node);
}
@@ -692,7 +692,7 @@ overwriteMethodForPanel(
overwriteMethodForPanel(
FirebugReps.TextNode,
"getRealObject",
- Firebug.XPathPanel.prototype.name,
+ Firebug.FirePathPanel.prototype.name,
function(object) {
return object.parentNode;
}
@@ -702,7 +702,7 @@ overwriteMethodForPanel(
// Tree definition
//TODO improve this (add the url, ns...)
-Firebug.XPathPanel.Document = domplate(FirebugReps.Document,
+Firebug.FirePathPanel.Document = domplate(FirebugReps.Document,
{
tag:
DIV({"class": "nodeBox containerNodeBox repIgnore", _repObject: "$object"},
@@ -725,7 +725,7 @@ Firebug.XPathPanel.Document = domplate(FirebugReps.Document,
)
});
-Firebug.XPathPanel.Element = domplate(FirebugReps.Element,
+Firebug.FirePathPanel.Element = domplate(FirebugReps.Element,
{
tag:
DIV({"class": "nodeBox containerNodeBox repIgnore", _repObject: "$object"},
@@ -734,7 +734,7 @@ Firebug.XPathPanel.Element = domplate(FirebugReps.Element,
SPAN({"class": "nodeLabelBox repTarget"},
"<",
SPAN({"class": "nodeTag"}, "$object|getTagName"),
- FOR("attr", "$object|attrIterator|filterFireXPathClass", Firebug.XPathPanel.Attr.tag),
+ FOR("attr", "$object|attrIterator|filterFirePathClass", Firebug.FirePathPanel.Attr.tag),
SPAN({"class": "nodeBracket insertBefore"}, ">")
)
),
@@ -747,15 +747,15 @@ Firebug.XPathPanel.Element = domplate(FirebugReps.Element,
)
)
),
- filterFireXPathClassValue:
+ filterFirePathClassValue:
function(value) {
- return value.replace(" firexpath-matching-node", "");
+ return value.replace(" firepath-matching-node", "");
},
- filterFireXPathClass:
+ filterFirePathClass:
function(attrs) {
for (var i=0; i<attrs.length; i++) {
var attr = attrs[i];
- if(attr.localName == "class" && attr.nodeValue == "firexpath-matching-node") {
+ if(attr.localName == "class" && attr.nodeValue == "firepath-matching-node") {
attrs.splice(i, 1);
break;
}
@@ -764,7 +764,7 @@ Firebug.XPathPanel.Element = domplate(FirebugReps.Element,
}
});
-Firebug.XPathPanel.TextElement = domplate(Firebug.XPathPanel.Element,
+Firebug.FirePathPanel.TextElement = domplate(Firebug.FirePathPanel.Element,
{
tag:
DIV({"class": "nodeBox textNodeBox repIgnore", _repObject: "$object"},
@@ -772,7 +772,7 @@ Firebug.XPathPanel.TextElement = domplate(Firebug.XPathPanel.Element,
SPAN({"class": "nodeLabelBox repTarget"},
"<",
SPAN({"class": "nodeTag"}, "$object|getTagName"),
- FOR("attr", "$object|attrIterator|filterFireXPathClass", Firebug.XPathPanel.Attr.tag),
+ FOR("attr", "$object|attrIterator|filterFirePathClass", Firebug.FirePathPanel.Attr.tag),
SPAN({"class": "nodeBracket insertBefore"}, ">"),
SPAN({"class": "nodeText", _repObject: "$object.firstChild"}, "$object.firstChild.nodeValue|escapeWhitespace"),
"</",
@@ -786,7 +786,7 @@ Firebug.XPathPanel.TextElement = domplate(Firebug.XPathPanel.Element,
}
});
-Firebug.XPathPanel.EmptyElement = domplate(Firebug.XPathPanel.Element,
+Firebug.FirePathPanel.EmptyElement = domplate(Firebug.FirePathPanel.Element,
{
tag:
DIV({"class": "nodeBox emptyNodeBox repIgnore", _repObject: "$object"},
@@ -794,14 +794,14 @@ Firebug.XPathPanel.EmptyElement = domplate(Firebug.XPathPanel.Element,
SPAN({"class": "nodeLabelBox repTarget"},
"<",
SPAN({"class": "nodeTag"}, "$object|getTagName"),
- FOR("attr", "$object|attrIterator|filterFireXPathClass", Firebug.XPathPanel.Attr.tag),
+ FOR("attr", "$object|attrIterator|filterFirePathClass", Firebug.FirePathPanel.Attr.tag),
SPAN({"class": "nodeBracket insertBefore"}, "/>")
)
)
)
});
-Firebug.XPathPanel.TextNode = domplate(Firebug.XPathPanel.TextElement,
+Firebug.FirePathPanel.TextNode = domplate(Firebug.FirePathPanel.TextElement,
{
tag:
DIV({"class": "nodeBox", _repObject: "$object"},
@@ -815,24 +815,24 @@ Firebug.XPathPanel.TextNode = domplate(Firebug.XPathPanel.TextElement,
function getNodeTag(node) {
if (node instanceof Element) {
if (node instanceof HTMLAppletElement)
- return Firebug.XPathPanel.EmptyElement.tag;
+ return Firebug.FirePathPanel.EmptyElement.tag;
else if (node.firebugIgnore || node.id == "_firebugConsole" || node.className == "firebugHighlight")
return null;
else if (isEmptyElement(node))
- return Firebug.XPathPanel.EmptyElement.tag;
+ return Firebug.FirePathPanel.EmptyElement.tag;
else if (isPureText(node))
- return Firebug.XPathPanel.TextElement.tag;
+ return Firebug.FirePathPanel.TextElement.tag;
else
- return Firebug.XPathPanel.Element.tag;
+ return Firebug.FirePathPanel.Element.tag;
}
else if(node instanceof Document)
- return Firebug.XPathPanel.Document.tag;
+ return Firebug.FirePathPanel.Document.tag;
else if (node instanceof Text)
- return Firebug.XPathPanel.TextNode.tag;
+ return Firebug.FirePathPanel.TextNode.tag;
else if (node instanceof CDATASection)
- return Firebug.XPathPanel.CDATASection.tag;
+ return Firebug.FirePathPanel.CDATASection.tag;
else if (node instanceof Comment)
- return Firebug.XPathPanel.Comment.tag;
+ return Firebug.FirePathPanel.Comment.tag;
else
return FirebugReps.Nada.tag;
}
@@ -867,7 +867,7 @@ function isEmptyElement(element) {
}
function getOptionMenu(label, option) {
- var key = Firebug.XPathPanel.prototype.name + "." + option;
+ var key = Firebug.FirePathPanel.prototype.name + "." + option;
var value = Firebug.getPref(Firebug.prefDomain, key);
return {label: $STR_XP(label),
@@ -882,7 +882,7 @@ function getNodeContextMenu(node, target, context) {
// This to make sure the context menu is added to the right object
if(node != Firebug.getRepObject(target)) return;
- var xPathBar = context.getPanel(panelName).xPathBar;
+ var firePathBar = context.getPanel(panelName).firePathBar;
var contextMenu = [
{label: $STR_XP("copy", $STR_XP("xpathSelector")),
@@ -893,8 +893,8 @@ function getNodeContextMenu(node, target, context) {
command: bindFixed(copyCssSelector, FBL, node)}
];
- if(Firebug.getPref(Firebug.prefDomain, "xpath.showXPathContext")) {
- var panel = context.getPanel(Firebug.XPathPanel.prototype.name);
+ if(Firebug.getPref(Firebug.prefDomain, "firepath.showParentToolbar")) {
+ var panel = context.getPanel(Firebug.FirePathPanel.prototype.name);
if(panel.rootElement && panel.rootElement != panel.location.document) {
contextMenu.push(
{label: $STR_XP("copyFromContext", $STR_XP("xpathSelector")),
@@ -910,19 +910,19 @@ function getNodeContextMenu(node, target, context) {
}
contextMenu.push(
- {label: $STR_XP("setSelector", $STR_XP(xPathBar.evaluationMode + 'Selector')),
+ {label: $STR_XP("setSelector", $STR_XP(firePathBar.evaluationMode + 'Selector')),
nol10n: true,
- command: bindFixed(xPathBar.setNode, xPathBar, node)}
+ command: bindFixed(firePathBar.setNode, firePathBar, node)}
)
var element = null;
if(node instanceof Element) {
element = node;
- if(Firebug.getPref(Firebug.prefDomain, "xpath.showXPathContext"))
+ if(Firebug.getPref(Firebug.prefDomain, "firepath.showParentToolbar"))
contextMenu.push(
{label: $STR_XP("setContext"),
nol10n: true,
- command: bindFixed(xPathBar.setContextNode, xPathBar, node)}
+ command: bindFixed(firePathBar.setContextNode, firePathBar, node)}
);
}
else if(node instanceof Attr)
@@ -965,7 +965,7 @@ function escapeWhitespace(value) {
FBL.$STR_XP = function() {
var args = cloneArray(arguments);
var key = args.shift();
- var bundle = document.getElementById("FireXpath_strings");
+ var bundle = document.getElementById("Firepath_strings");
try{
if(args.length > 0)
return bundle.getFormattedString(key, args);
@@ -1006,7 +1006,7 @@ FBL.getPrefixFromNS = function(ns) {
FBL.getXPathFromNode = function(node, context) {
var result = "";
var stop = false;
- var absolute = Firebug.getPref(Firebug.prefDomain, "xpath.generateAbsoluteXPath");
+ var absolute = Firebug.getPref(Firebug.prefDomain, "firepath.generateAbsoluteXPath");
var parent = context || node.ownerDocument;
while (node && node != parent && !stop) {
@@ -1206,7 +1206,7 @@ InsideOutBox.prototype = extend(InsideOutBox.prototype, {
// ************************************************************************************************
// Auto Completion
-Firebug.XPathPanel.xPathAutoCompleter = function(evaluator) {
+Firebug.FirePathPanel.xPathAutoCompleter = function(evaluator) {
this.autoCompleter = new Firebug.AutoCompleter(
null,
bind(this.getAutoCompleteRange, this),
@@ -1216,7 +1216,7 @@ Firebug.XPathPanel.xPathAutoCompleter = function(evaluator) {
this.evaluator = evaluator;
}
-Firebug.XPathPanel.xPathAutoCompleter.prototype = {
+Firebug.FirePathPanel.xPathAutoCompleter.prototype = {
reset: function() {
this.autoCompleter.reset();
@@ -1640,7 +1640,7 @@ Stepper.prototype = {
// ************************************************************************************************
// location highlighting module
-Firebug.XPathPanel.LocationHighlightModule = extend(Firebug.Module,
+Firebug.FirePathPanel.LocationHighlightModule = extend(Firebug.Module,
{
// add event listener
initializeUI: function(detachArgs) {
@@ -1680,7 +1680,7 @@ Firebug.XPathPanel.LocationHighlightModule = extend(Firebug.Module,
// ************************************************************************************************
// result highlighting module
-Firebug.XPathPanel.ResultHighlightModule = extend(Firebug.Module,
+Firebug.FirePathPanel.ResultHighlightModule = extend(Firebug.Module,
{
initialize: function() {
this.highlighted = false;
@@ -1688,21 +1688,21 @@ Firebug.XPathPanel.ResultHighlightModule = extend(Firebug.Module,
},
destroyContext: function(context, persistedState) {
- persistedState.persistedXPathResultNotHighlighted = !!context.xPathResultNotHighlighted;
+ persistedState.persistedFirePathResultNotHighlighted = !!context.firePathResultNotHighlighted;
this.clear();
},
loadedContext: function(context) {
if(context.persistedState)
- context.xPathResultNotHighlighted = context.persistedState.persistedXPathResultNotHighlighted
+ context.firePathResultNotHighlighted = context.persistedState.persistedFirePathResultNotHighlighted
},
reattachContext: function(browser, context) {
- this.highlightButton = browser.chrome.$("FireXPathBarHighlightButton");
+ this.highlightButton = browser.chrome.$("FirePathBarHighlightButton");
},
showContext: function(browser, context) {
- this.highlightButton = browser.chrome.$("FireXPathBarHighlightButton");
+ this.highlightButton = browser.chrome.$("FirePathBarHighlightButton");
this.refreshHighlightButton(context.getPanel(panelName));
},
@@ -1713,7 +1713,7 @@ Firebug.XPathPanel.ResultHighlightModule = extend(Firebug.Module,
showPanel: function(browser, panel) {
if(panel.name == panelName) {
this.highlightButton.collapsed = false;
- if(!panel.context.xPathResultNotHighlighted)
+ if(!panel.context.firePathResultNotHighlighted)
this.highlight(panel.context);
} else {
this.highlightButton.collapsed = true;
@@ -1725,7 +1725,7 @@ Firebug.XPathPanel.ResultHighlightModule = extend(Firebug.Module,
if(panel.evaluationResult != null && isArray(panel.evaluationResult) &&
panel.evaluationResult.some(function(e) {return e.nodeType == 1 && (e.namespaceURI == null || e.namespaceURI == xhtmlNS)}))
{
- this.highlightButton.setAttribute("checked", !panel.context.xPathResultNotHighlighted);
+ this.highlightButton.setAttribute("checked", !panel.context.firePathResultNotHighlighted);
this.highlightButton.setAttribute("disabled", false);
} else {
this.highlightButton.setAttribute("checked", false);
@@ -1736,20 +1736,20 @@ Firebug.XPathPanel.ResultHighlightModule = extend(Firebug.Module,
// call when the result has changed
refreshHighlight: function(panel) {
this.refreshHighlightButton(panel);
- if(!panel.context.xPathResultNotHighlighted) {
+ if(!panel.context.firePathResultNotHighlighted) {
this.clear();
this.highlight(panel.context);
}
},
toggleHighlight: function(context) {
- if(!context.xPathResultNotHighlighted) {
+ if(!context.firePathResultNotHighlighted) {
this.clear();
} else {
this.highlight(context);
}
- context.xPathResultNotHighlighted = !context.xPathResultNotHighlighted
- this.highlightButton.setAttribute("checked", !context.xPathResultNotHighlighted);
+ context.firePathResultNotHighlighted = !context.firePathResultNotHighlighted
+ this.highlightButton.setAttribute("checked", !context.firePathResultNotHighlighted);
},
highlight: function(context) {
@@ -1757,23 +1757,23 @@ Firebug.XPathPanel.ResultHighlightModule = extend(Firebug.Module,
var doc = panel.location.document;
var resultElement = panel.evaluationResult;
- var isCSSAttached = doc.getElementById("firexpath-matching-node-style");
+ var isCSSAttached = doc.getElementById("firepath-matching-node-style");
if(!isCSSAttached) {
var head = doc.getElementsByTagName("head")[0]
if(head) {
- if(!context.fireXPathStyleSheet) {
+ if(!context.firePathStyleSheet) {
var styleSheet = document.createElementNS(xhtmlNS, "style");
styleSheet.firebugIgnore = true;
styleSheet.setAttribute("type", "text/css");
- styleSheet.setAttribute("id", "firexpath-matching-node-style");
+ styleSheet.setAttribute("id", "firepath-matching-node-style");
styleSheet.innerHTML =
- ".firexpath-matching-node {" +
+ ".firepath-matching-node {" +
" outline: 2px dashed #00F;" +
"}";
- context.fireXPathStyleSheet = styleSheet;
+ context.firePathStyleSheet = styleSheet;
}
- head.appendChild(context.fireXPathStyleSheet);
+ head.appendChild(context.firePathStyleSheet);
} else {
// if we can't attach the stylesheet there is no need to highlighting the result
// for instance in XML documents
@@ -1783,7 +1783,7 @@ Firebug.XPathPanel.ResultHighlightModule = extend(Firebug.Module,
var step = bind(function(element) {
if(element.nodeType == 1 && isVisible(element)) {
- setClass(element, "firexpath-matching-node");
+ setClass(element, "firepath-matching-node");
this.highlightedElement.push(element);
}
}, this);
@@ -1796,9 +1796,9 @@ Firebug.XPathPanel.ResultHighlightModule = extend(Firebug.Module,
},
clear: function(doc) {
- // clear the stylesheet from the doc before evaluating an XPath expression
+ // clear the stylesheet from the doc before evaluating an expression
if(doc) {
- var styleSheet = doc.getElementById("firexpath-matching-node-style");
+ var styleSheet = doc.getElementById("firepath-matching-node-style");
if(styleSheet) {
styleSheet.parentNode.removeChild(styleSheet);
}
@@ -1810,7 +1810,7 @@ Firebug.XPathPanel.ResultHighlightModule = extend(Firebug.Module,
}
var element;
while(element = this.highlightedElement.pop()) {
- removeClass(element, "firexpath-matching-node");
+ removeClass(element, "firepath-matching-node");
if (element.className === '' || (element.className && element.className.trim().length === 0)) {
element.removeAttribute("class");
}
@@ -1819,7 +1819,7 @@ Firebug.XPathPanel.ResultHighlightModule = extend(Firebug.Module,
})
// ************************************************************************************************
-// Overwrite inspector to make sure it stay on the XPath tab (instead of going to the HTML tab)
+// Overwrite inspector to make sure it stay on the FirePath tab (instead of going to the HTML tab)
overwriteMethodForPanel(
Firebug.Inspector,
@@ -1846,7 +1846,7 @@ overwriteMethodForPanel(
panel = context.chrome.selectPanel("html");
this.previousObject = panel.selection;
} else {
- panel = context.getPanel("xpath");
+ panel = context.getPanel(panelName);
}
if (context.detached)
@@ -1886,7 +1886,7 @@ overwriteMethodForPanel(
this.inspecting = false;
var htmlPanel = context.getPanel("html");
- var xPathPanel = context.getPanel("xpath");
+ var firePathPanel = context.getPanel(panelName);
if (this.previouslyFocused)
context.chrome.focus();
@@ -1910,7 +1910,7 @@ overwriteMethodForPanel(
if(this.previouslyCollapsed)
htmlPanel.stopInspecting(htmlPanel.selection, cancelled);
else
- xPathPanel.stopInspecting(cancelled);
+ firePathPanel.stopInspecting(cancelled);
this.inspectNode(null);
@@ -1921,7 +1921,7 @@ overwriteMethodForPanel(
}
);
-Firebug.registerPanel(Firebug.XPathPanel);
-Firebug.registerModule(Firebug.XPathPanel.LocationHighlightModule, Firebug.XPathPanel.ResultHighlightModule);
-if(Firebug.registerUIListener) Firebug.registerUIListener(Firebug.XPathPanel.ResultHighlightModule);
+Firebug.registerPanel(Firebug.FirePathPanel);
+Firebug.registerModule(Firebug.FirePathPanel.LocationHighlightModule, Firebug.FirePathPanel.ResultHighlightModule);
+if(Firebug.registerUIListener) Firebug.registerUIListener(Firebug.FirePathPanel.ResultHighlightModule);
}});
\ No newline at end of file
diff --git a/content/FireXPath.png b/content/FireXPath.png
deleted file mode 100644
index cfd609a..0000000
Binary files a/content/FireXPath.png and /dev/null differ
diff --git a/content/bindings.xml b/content/bindings.xml
index de4ccfd..d918dca 100644
--- a/content/bindings.xml
+++ b/content/bindings.xml
@@ -1,34 +1,34 @@
<?xml version="1.0"?>
-<!DOCTYPE bindings SYSTEM "chrome://firexpath/locale/FireXPath.dtd">
+<!DOCTYPE bindings SYSTEM "chrome://firepath/locale/FirePath.dtd">
<!--
- Copyright (C) 2009 Pierre Tholence, DB4ALL
+ Copyright (C) 2009 - 2010 Pierre Tholence
- This file is part of FireXPath
+ This file is part of FirePath
- FireXPath is free software: you can redistribute it and/or modify
+ FirePath is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
- FireXPath is distributed in the hope that it will be useful,
+ FirePath is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with FireXPath. If not, see <http://www.gnu.org/licenses/>.
+ along with FirePath. If not, see <http://www.gnu.org/licenses/>.
-->
<bindings xmlns="http://www.mozilla.org/xbl"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
- <binding id="xPath-textbox" extends="chrome://global/content/bindings/textbox.xml#textbox">
+ <binding id="FirePath-textbox" extends="chrome://global/content/bindings/textbox.xml#textbox">
<implementation>
- <field name="_xPathBar">null</field>
- <property name="xPathBar" readonly="true">
+ <field name="_firePathBar">null</field>
+ <property name="firePathBar" readonly="true">
<getter><![CDATA[
- return this._xPathBar ?
- this._xPathBar : this._xPathBar = document.getBindingParent(this);
+ return this._firePathBar ?
+ this._firePathBar : this._firePathBar = document.getBindingParent(this);
]]></getter>
</property>
@@ -46,10 +46,10 @@
<method name="checkSyntax">
<body><![CDATA[
- if (this.value === "" || this.xPathBar.isValidSelector(this.value)) {
+ if (this.value === "" || this.firePathBar.isValidSelector(this.value)) {
this.setStatus();
} else {
- var errorMessage = this.xPathBar.evaluationMode === 'xpath'?
+ var errorMessage = this.firePathBar.evaluationMode === 'xpath'?
FBL.$STR_XP("invalidXPathError"):
FBL.$STR_XP("invalidCSSSelectorError");
this.setStatus("error", errorMessage);
@@ -68,21 +68,21 @@
<handlers>
<handler event="input"><![CDATA[
this.checkSyntax();
- this.xPathBar.autoCompleter.reset();
+ this.firePathBar.autoCompleter.reset();
]]></handler>
<handler event="keypress"><![CDATA[
switch (event.keyCode) {
case KeyEvent.DOM_VK_RETURN:
- this.xPathBar.evaluate();
+ this.firePathBar.evaluate();
break;
case KeyEvent.DOM_VK_UP:
- this.xPathBar.autoCompleter.complete(FirebugContext, this, true, true);
+ this.firePathBar.autoCompleter.complete(FirebugContext, this, true, true);
this.checkSyntax();
break;
case KeyEvent.DOM_VK_TAB:
event.preventDefault();
case KeyEvent.DOM_VK_DOWN:
- this.xPathBar.autoCompleter.complete(FirebugContext, this, true, false);
+ this.firePathBar.autoCompleter.complete(FirebugContext, this, true, false);
this.checkSyntax();
break;
}
@@ -90,24 +90,24 @@
</handlers>
</binding>
- <binding id="xPathBar" extends="xul:hbox">
+ <binding id="FirePathBar" extends="xul:hbox">
<content>
<xul:toolbarseparator/>
<xul:toolbaritem align="center" flex="6">
- <xul:toolbarbutton anonid="mode-selector-button" accesskey="&FireXPath.xPath.key;" type="menu" oncommand="document.getBindingParent(this).changeMode(event)">
+ <xul:toolbarbutton anonid="mode-selector-button" accesskey="&FirePath.xPath.key;" type="menu" oncommand="document.getBindingParent(this).changeMode(event)">
<xul:menupopup>
- <xul:menuitem mode="xpath" label="&FireXPath.xPath.label;" accesskey="&FireXPath.xPath.key;" />
- <xul:menuitem mode="css" label="&FireXPath.CSS.label;" accesskey="&FireXPath.CSS.key;"/>
+ <xul:menuitem mode="xpath" label="&FirePath.xPath.label;" accesskey="&FirePath.xPath.key;" />
+ <xul:menuitem mode="css" label="&FirePath.CSS.label;" accesskey="&FirePath.CSS.key;"/>
</xul:menupopup>
</xul:toolbarbutton>
- <xul:hbox class="xpath-field-container" flex="1">
- <xul:textbox anonid="xpath-textbox" id="xPathBar-xpath-textbox" class="xpath-textbox" minwidth="100" flex="1"/>
+ <xul:hbox class="firepath-field-container" flex="1">
+ <xul:textbox anonid="firepath-textbox" id="firePathBar-firepath-textbox" class="firepath-textbox" minwidth="100" flex="1"/>
</xul:hbox>
</xul:toolbaritem>
- <xul:toolbaritem anonid="xpath-context-toolbar" align="center" flex="1">
- <xul:label value="&FireXPath.context.label;" control="xPathBar-parent-textbox" accesskey="&FireXPath.context.key;"/>
- <xul:hbox class="xpath-field-container" flex="1">
- <xul:textbox anonid="parent-textbox" id="xPathBar-parent-textbox" class="xpath-textbox" flex="1"/>
+ <xul:toolbaritem anonid="firepath-context-toolbar" align="center" flex="1">
+ <xul:label value="&FirePath.context.label;" control="firePathBar-parent-textbox" accesskey="&FirePath.context.key;"/>
+ <xul:hbox class="firepath-field-container" flex="1">
+ <xul:textbox anonid="parent-textbox" id="firePathBar-parent-textbox" class="firepath-textbox" flex="1"/>
</xul:hbox>
<xul:textbox anonid="parent-node-number-textbox"
type="number"
@@ -117,7 +117,7 @@
collapsed="true"
increment="1"/>
</xul:toolbaritem>
- <xul:toolbarbutton label="&FireXPath.eval.button;" oncommand="document.getBindingParent(this).evaluate();">
+ <xul:toolbarbutton label="&FirePath.eval.button;" oncommand="document.getBindingParent(this).evaluate();">
</xul:toolbarbutton>
</content>
<implementation>
@@ -144,7 +144,7 @@
};
} else {
return this._autoCompleter ?
- this._autoCompleter : this._autoCompleter = new Firebug.XPathPanel.xPathAutoCompleter(this);
+ this._autoCompleter : this._autoCompleter = new Firebug.FirePathPanel.xPathAutoCompleter(this);
}
]]></getter>
</property>
@@ -158,10 +158,10 @@
<property name="selector">
<getter><![CDATA[
- return this.getElement("xpath-textbox").value;
+ return this.getElement("firepath-textbox").value;
]]></getter>
<setter><![CDATA[
- this.getElement("xpath-textbox").setValue(val);
+ this.getElement("firepath-textbox").setValue(val);
return val;
]]></setter>
</property>
@@ -187,7 +187,7 @@
<property name="parentToolbar" readonly="true">
<getter><![CDATA[
- return this.getElement("xpath-context-toolbar");
+ return this.getElement("firepath-context-toolbar");
]]></getter>
</property>
@@ -199,7 +199,7 @@
<property name="FirePathPanel" readonly="true">
<getter><![CDATA[
- return FirebugContext.getPanel(Firebug.XPathPanel.prototype.name);
+ return FirebugContext.getPanel(Firebug.FirePathPanel.prototype.name);
]]></getter>
</property>
@@ -225,7 +225,7 @@
<method name="initialize">
<body><![CDATA[
if(Firebug) {
- this.parentToolbar.collapsed = !Firebug.getPref(Firebug.prefDomain, "xpath.showXPathContext");
+ this.parentToolbar.collapsed = !Firebug.getPref(Firebug.prefDomain, "firepath.showParentToolbar");
this.setEvaluationMode();
}
]]></body>
@@ -239,9 +239,9 @@
this.parentSelector = this.evalutationMode === 'xpath'? "/": "";
this.parentNodeNumber.collapsed = true;
this.parentNodes = null;
- this.lastSelecor = "";
+ this.lastSelector = "";
this.lastParent = null;
- context.xPathBarInit = true;
+ context.firePathBarInit = true;
]]></body>
</method>
@@ -252,13 +252,13 @@
this.collapsed = !show;
if(show) {
this.currentContext = context;
- if(!context.xPathBarInit)
+ if(!context.firePathBarInit)
this.init(context);
else
this.restore(context);
var that = this
setTimeout(function() {
- that.getElement("xpath-textbox").focus();
+ that.getElement("firepath-textbox").focus();
},10)
} else {
if(context == this.currentContext)
@@ -270,16 +270,16 @@
<method name="persiste">
<parameter name="state"/>
<body><![CDATA[
- if(!state.xPathBarState) state.xPathBarState = {};
- this.copyState(this, state.xPathBarState);
+ if(!state.firePathBarState) state.firePathBarState = {};
+ this.copyState(this, state.firePathBarState);
]]></body>
</method>
<method name="restore">
<parameter name="state"/>
<body><![CDATA[
- if(state.xPathBarState) {
- this.copyState(state.xPathBarState, this)
+ if(state.firePathBarState) {
+ this.copyState(state.firePathBarState, this)
}
]]></body>
</method>
@@ -296,13 +296,13 @@
to.parentNodeNumber.collapsed = from.parentNodeNumber.collapsed;
to.parentNodes = from.parentNodes;
to.NSResolver = from.NSResolver;
- to.lastXPath = from.lastXPath;
+ to.lastSelector = from.lastSelector;
to.lastParent = from.lastParent;
]]></body>
</method>
<!--******************************************************************************************************
- XPath Evaluation methods
+ Selector Evaluation methods
-->
<method name="evaluate">
@@ -310,12 +310,12 @@
<body><![CDATA[
var selector = this.selector;
if(reevaluate)
- selector = this.lastSelecor;
+ selector = this.lastSelector;
var context = this.getContextNode(reevaluate);
if(selector != "") {
- if(!reevaluate && this.lastSelecor == selector && this.lastParent == context)
+ if(!reevaluate && this.lastSelector == selector && this.lastParent == context)
return;
var contextTextbox = this.getElement("parent-textbox");
@@ -328,11 +328,11 @@
}
var result = this._evaluateExpression(this.selector, context);
- this.lastSelecor = this.selector;
+ this.lastSelector = this.selector;
this.lastParent = context;
this.FirePathPanel.setResult(context, result);
} else {
- this.lastSelecor = "";
+ this.lastSelector = "";
this.FirePathPanel.setResult(context, null);
}
]]></body>
@@ -353,7 +353,7 @@
<parameter name="selector"/>
<parameter name="contextNode"/>
<body><![CDATA[
- Firebug.XPathPanel.ResultHighlightModule.clear(this.FirePathPanel.location.document);
+ Firebug.FirePathPanel.ResultHighlightModule.clear(this.FirePathPanel.location.document);
if(this.evaluationMode === 'xpath') {
var xPathExpression = this.getXPathExpression(selector);
@@ -464,9 +464,9 @@
<parameter name="event"/>
<body><![CDATA[
if(event.target == this.getElement("mode-selector-button"))
- this.getElement("xpath-textbox").focus();
+ this.getElement("firepath-textbox").focus();
this.setEvaluationMode(event.target.getAttribute("mode"));
- this.getElement("xpath-textbox").checkSyntax();
+ this.getElement("firepath-textbox").checkSyntax();
this.reset(),
this.evaluate();
]]></body>
@@ -477,7 +477,7 @@
<body><![CDATA[
var evaluationMode;
if(!mode)
- evaluationMode = Firebug.getPref(Firebug.prefDomain, "xpath.evaluationMode");
+ evaluationMode = Firebug.getPref(Firebug.prefDomain, "firepath.evaluationMode");
else
evaluationMode = mode;
@@ -486,7 +486,7 @@
var menuitem = document.getAnonymousElementByAttribute(button, "mode", evaluationMode);
button.label = menuitem.label;
- Firebug.setPref(Firebug.prefDomain, "xpath.evaluationMode", evaluationMode);
+ Firebug.setPref(Firebug.prefDomain, "firepath.evaluationMode", evaluationMode);
]]></body>
</method>
@@ -523,13 +523,13 @@
<method name="reset">
<body><![CDATA[
- delete this.lastSelecor;
+ delete this.lastSelector;
delete this.lastParent;
delete this.lastParentSelector;
]]></body>
</method>
- <method name="showXPathContext">
+ <method name="showParentToolbar">
<parameter name="show"/>
<body><![CDATA[
this.parentToolbar.collapsed = !show;
@@ -629,17 +629,17 @@
</implementation>
</binding>
- <binding id="xPathStatusBar" extends="xul:hbox">
+ <binding id="FirePathStatusBar" extends="xul:hbox">
<content>
<xul:statusbarpanel flex="1" align="center" pack="left">
- <xul:image anonid="xpath-result-icon" class="xpath-result-icon"/>
- <xul:label anonid="xpath-result-info" value=""/>
+ <xul:image anonid="firepath-result-icon" class="firepath-result-icon"/>
+ <xul:label anonid="firepath-result-info" value=""/>
</xul:statusbarpanel>
- <xul:statusbarpanel anonid="xpath-result-progressmeter-container" collapsed="true">
+ <xul:statusbarpanel anonid="firepath-result-progressmeter-container" collapsed="true">
<xul:image src="chrome://firebug/skin/errorIcon.png"
onmousedown="document.getBindingParent(this).cancelLoading(FirebugContext)"
- class="cancel-xpath-result-loading-button"/>
- <xul:progressmeter anonid="xpath-result-progressmeter"/>
+ class="firepath-cancel-result-loading-button"/>
+ <xul:progressmeter anonid="firepath-result-progressmeter"/>
</xul:statusbarpanel>
</content>
<implementation>
@@ -650,32 +650,32 @@
<property name="progressMeter" readonly="true">
<getter><![CDATA[
- return this.getElement("xpath-result-progressmeter");
+ return this.getElement("firepath-result-progressmeter");
]]></getter>
</property>
<property name="progressMeterContainer" readonly="true">
<getter><![CDATA[
- return this.getElement("xpath-result-progressmeter-container");
+ return this.getElement("firepath-result-progressmeter-container");
]]></getter>
</property>
<property name="resultInfo">
<getter><![CDATA[
- return this.getElement("xpath-result-info").value;
+ return this.getElement("firepath-result-info").value;
]]></getter>
<setter><![CDATA[
- this.getElement("xpath-result-info").value = val;
+ this.getElement("firepath-result-info").value = val;
return val;
]]></setter>
</property>
<property name="resultIcon">
<getter><![CDATA[
- return this.getElement("xpath-result-icon").getAttribute("status");
+ return this.getElement("firepath-result-icon").getAttribute("status");
]]></getter>
<setter><![CDATA[
- this.getElement("xpath-result-icon").setAttribute("status", val);
+ this.getElement("firepath-result-icon").setAttribute("status", val);
return val;
]]></setter>
</property>
@@ -688,9 +688,9 @@
<parameter name="context"/>
<parameter name="stepNumber"/>
<body><![CDATA[
- context.xPathStatusBar.loading = true;
- context.xPathStatusBar.stepNumber = stepNumber;
- context.xPathStatusBar.currentStep = 0;
+ context.FirePathStatusBar.loading = true;
+ context.FirePathStatusBar.stepNumber = stepNumber;
+ context.FirePathStatusBar.currentStep = 0;
this.progressMeter.value = 0;
this.progressMeterContainer.collapsed = false;
]]></body>
@@ -699,16 +699,16 @@
<method name="increaseLoading">
<parameter name="context"/>
<body><![CDATA[
- context.xPathStatusBar.currentStep += 1;
- if(context.xPathStatusBar.shown)
- this.progressMeter.value = context.xPathStatusBar.currentStep / context.xPathStatusBar.stepNumber * 100;
+ context.FirePathStatusBar.currentStep += 1;
+ if(context.FirePathStatusBar.shown)
+ this.progressMeter.value = context.FirePathStatusBar.currentStep / context.FirePathStatusBar.stepNumber * 100;
]]></body>
</method>
<method name="stopLoading">
<parameter name="context"/>
<body><![CDATA[
- delete context.xPathStatusBar.loading;
+ delete context.FirePathStatusBar.loading;
this.progressMeterContainer.collapsed = true;
]]></body>
</method>
@@ -716,11 +716,11 @@
<method name="cancelLoading">
<parameter name="context"/>
<body><![CDATA[
- var panel = context.getPanel(Firebug.XPathPanel.prototype.name);
+ var panel = context.getPanel(Firebug.FirePathPanel.prototype.name);
panel.stopLoading();
- panel.xPathBar.reset();
- this.resultInfo = this.resultInfo + " (" + FBL.$STR_XP("nodeSelectedMessage", context.xPathStatusBar.currentStep) + ")";
- context.xPathStatusBar.resultInfo = this.resultInfo;
+ panel.firePathBar.reset();
+ this.resultInfo = this.resultInfo + " (" + FBL.$STR_XP("nodeSelectedMessage", context.FirePathStatusBar.currentStep) + ")";
+ context.FirePathStatusBar.resultInfo = this.resultInfo;
]]></body>
</method>
@@ -735,9 +735,9 @@
<parameter name="status"/>
<parameter name="info"/>
<body><![CDATA[
- context.xPathStatusBar.resultInfo = info;
+ context.FirePathStatusBar.resultInfo = info;
this.resultInfo = info;
- context.xPathStatusBar.resultIcon = status;
+ context.FirePathStatusBar.resultIcon = status;
this.resultIcon = status;
]]></body>
</method>
@@ -745,9 +745,9 @@
<method name="clearResultInfo">
<parameter name="context"/>
<body><![CDATA[
- delete context.xPathStatusBar.resultInfo;
+ delete context.FirePathStatusBar.resultInfo;
this.resultInfo = "";
- delete context.xPathStatusBar.resultIcon;
+ delete context.FirePathStatusBar.resultIcon;
this.resultIcon = "";
]]></body>
</method>
@@ -760,14 +760,14 @@
<parameter name="context"/>
<parameter name="show"/>
<body><![CDATA[
- if(!context.xPathStatusBar)
- context.xPathStatusBar = {};
+ if(!context.FirePathStatusBar)
+ context.FirePathStatusBar = {};
if(show) {
- this.resultInfo = context.xPathStatusBar.resultInfo || "";
- this.resultIcon = context.xPathStatusBar.resultIcon || "";
- this.progressMeterContainer.collapsed = !context.xPathStatusBar.loading;
+ this.resultInfo = context.FirePathStatusBar.resultInfo || "";
+ this.resultIcon = context.FirePathStatusBar.resultIcon || "";
+ this.progressMeterContainer.collapsed = !context.FirePathStatusBar.loading;
}
- context.xPathStatusBar.shown = show;
+ context.FirePathStatusBar.shown = show;
this.collapsed = !show;
]]></body>
</method>
diff --git a/content/firebugOverlay.xul b/content/firebugOverlay.xul
index 89cdce9..ae0a42d 100644
--- a/content/firebugOverlay.xul
+++ b/content/firebugOverlay.xul
@@ -1,31 +1,31 @@
<?xml version="1.0"?>
-<!DOCTYPE overlay SYSTEM "chrome://firexpath/locale/FireXPath.dtd">
-<?xml-stylesheet href="chrome://firexpath/skin/FireXPath.css" type="text/css"?>
+<!DOCTYPE overlay SYSTEM "chrome://firepath/locale/FirePath.dtd">
+<?xml-stylesheet href="chrome://firepath/skin/FirePath.css" type="text/css"?>
<overlay xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
- <script src="chrome://firexpath/content/XPathPanel.js" type="application/javascript"/>
+ <script src="chrome://firepath/content/FirePathPanel.js" type="application/javascript"/>
<stringbundleset id="stringbundleset">
- <stringbundle id="FireXpath_strings" src="chrome://firexpath/locale/FireXPath.properties"/>
+ <stringbundle id="Firepath_strings" src="chrome://firepath/locale/FirePath.properties"/>
</stringbundleset>
<popup id="contentAreaContextMenu">
- <menuitem id="menu_fxpShow" label="&FireXPath.context.show.label;"
+ <menuitem id="menu_fpShow" label="&FirePath.context.show.label;"
insertafter="context-viewpartialsource-selection"
- oncommand="Firebug.toggleBar(true); FirebugChrome.selectPanel('xpath').updateSelection(document.popupNode)"
- accesskey="X"/>
+ oncommand="Firebug.toggleBar(true); FirebugChrome.selectPanel('firepath').updateSelection(document.popupNode)"
+ accesskey="&FirePath.context.show.key;"/>
</popup>
<hbox id="fbToolbarInner">
- <toolbarbutton id="FireXPathBarHighlightButton" collapsed="true" label="&FireXPath.highlight.button;" class="toolbar-text-button"
- oncommand="Firebug.XPathPanel.ResultHighlightModule.toggleHighlight(FirebugContext);"
+ <toolbarbutton id="FirePathBarHighlightButton" collapsed="true" label="&FirePath.highlight.button;" class="toolbar-text-button"
+ oncommand="Firebug.FirePathPanel.ResultHighlightModule.toggleHighlight(FirebugContext);"
checked="false" disabled="true" insertafter="fbLocationList"/>
- <xpathbar id="FireXPathBar" flex="1" collapsed="true" insertafter="fbLocationList"/>
+ <firepathbar id="FirePathBar" flex="1" collapsed="true" insertafter="fbLocationList"/>
</hbox>
<vbox id="fbContentBox">
- <xpathstatusbar id="FireXPathStatusBar" insertafter="fbCommandBox" collapsed="true"/>
+ <firepathstatusbar id="FirePathStatusBar" insertafter="fbCommandBox" collapsed="true"/>
</vbox>
</overlay>
\ No newline at end of file
diff --git a/defaults/preferences/FirePathPref.js b/defaults/preferences/FirePathPref.js
new file mode 100644
index 0000000..c1e33e4
--- /dev/null
+++ b/defaults/preferences/FirePathPref.js
@@ -0,0 +1,4 @@
+pref("extensions.firebug.firepath.showParentToolbar", false);
+pref("extensions.firebug.firepath.generateAbsoluteXPath", false);
+pref("extensions.firebug.firepath.showDOM", true);
+pref("extensions.firebug.firepath.evaluationMode", "css");
\ No newline at end of file
diff --git a/defaults/preferences/FireXPathPref.js b/defaults/preferences/FireXPathPref.js
deleted file mode 100644
index f89e5c1..0000000
--- a/defaults/preferences/FireXPathPref.js
+++ /dev/null
@@ -1,4 +0,0 @@
-pref("extensions.firebug.xpath.showXPathContext", false);
-pref("extensions.firebug.xpath.generateAbsoluteXPath", false);
-pref("extensions.firebug.xpath.showDOM", true);
-pref("extensions.firebug.xpath.evaluationMode", "css");
\ No newline at end of file
diff --git a/install.rdf b/install.rdf
index adbc902..11c6280 100644
--- a/install.rdf
+++ b/install.rdf
@@ -14,9 +14,9 @@
</Description>
</em:targetApplication>
- <em:name>FireXPath</em:name>
- <em:description>FireXPath is a Firebug extension that adds a development tool to edit, inspect and generate XPath 1.0 expressions. </em:description>
+ <em:name>FirePath</em:name>
+ <em:description>FirePath is a Firebug extension that adds a development tool to edit, inspect and generate XPath 1.0 expressions and CSS 3 Selector. </em:description>
<em:creator>Pierre Tholence</em:creator>
- <em:iconURL>chrome://firexpath/content/FireXPath.png</em:iconURL>
+ <em:iconURL>chrome://firepath/content/FirePath.png</em:iconURL>
</Description>
</RDF>
diff --git a/locale/en-US/FirePath.dtd b/locale/en-US/FirePath.dtd
new file mode 100644
index 0000000..16da963
--- /dev/null
+++ b/locale/en-US/FirePath.dtd
@@ -0,0 +1,10 @@
+<!ENTITY FirePath.context.show.label "Inspect in FirePath">
+<!ENTITY FirePath.context.show.key "F">
+<!ENTITY FirePath.xPath.label "XPath: ">
+<!ENTITY FirePath.xPath.key "x">
+<!ENTITY FirePath.context.label "Parent: ">
+<!ENTITY FirePath.context.key "t">
+<!ENTITY FirePath.highlight.button "Highlight">
+<!ENTITY FirePath.eval.button "Eval">
+<!ENTITY FirePath.CSS.label "CSS: ">
+<!ENTITY FirePath.CSS.key "c">
\ No newline at end of file
diff --git a/locale/en-US/FireXPath.properties b/locale/en-US/FirePath.properties
similarity index 91%
rename from locale/en-US/FireXPath.properties
rename to locale/en-US/FirePath.properties
index b666d7e..37a2598 100644
--- a/locale/en-US/FireXPath.properties
+++ b/locale/en-US/FirePath.properties
@@ -12,7 +12,7 @@ numberResultMessage=1 Number
booleanResultMessage=1 Boolean
#option menu
-showXPathContextMenu=Show Parent toolbar
+showParentToolbar=Show Parent toolbar
generateAbsoluteXPathMenu=Generate absolute XPath
showDOMMenu=Show Entire DOM
diff --git a/locale/en-US/FireXPath.dtd b/locale/en-US/FireXPath.dtd
deleted file mode 100644
index c126e99..0000000
--- a/locale/en-US/FireXPath.dtd
+++ /dev/null
@@ -1,9 +0,0 @@
-<!ENTITY FireXPath.context.show.label "Inspect XPath">
-<!ENTITY FireXPath.xPath.label "XPath: ">
-<!ENTITY FireXPath.xPath.key "x">
-<!ENTITY FireXPath.context.label "Parent: ">
-<!ENTITY FireXPath.context.key "t">
-<!ENTITY FireXPath.highlight.button "Highlight">
-<!ENTITY FireXPath.eval.button "Eval">
-<!ENTITY FireXPath.CSS.label "CSS: ">
-<!ENTITY FireXPath.CSS.key "c">
\ No newline at end of file
diff --git a/logo/FirePath.xcf b/logo/FirePath.xcf
new file mode 100644
index 0000000..942655c
Binary files /dev/null and b/logo/FirePath.xcf differ
diff --git a/skin/classic/FireXPath.css b/skin/classic/FirePath.css
similarity index 53%
rename from skin/classic/FireXPath.css
rename to skin/classic/FirePath.css
index f6c190a..98a2024 100644
--- a/skin/classic/FireXPath.css
+++ b/skin/classic/FirePath.css
@@ -1,67 +1,67 @@
/*
- * Copyright (C) 2009 Pierre Tholence, DB4ALL
+ * Copyright (C) 2009 - 2010 Pierre Tholence
*
- * This file is part of FireXPath
+ * This file is part of FirePath
*
- * FireXPath is free software: you can redistribute it and/or modify
+ * FirePath is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * FireXPath is distributed in the hope that it will be useful,
+ * FirePath is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with FireXPath. If not, see <http://www.gnu.org/licenses/>.
+ * along with FirePath. If not, see <http://www.gnu.org/licenses/>.
*/
-xpathbar {
- -moz-binding: url("chrome://firexpath/content/bindings.xml#xPathBar");
+firepathbar {
+ -moz-binding: url("chrome://firepath/content/bindings.xml#FirePathBar");
}
-xpathstatusbar {
- -moz-binding: url("chrome://firexpath/content/bindings.xml#xPathStatusBar");
+firepathstatusbar {
+ -moz-binding: url("chrome://firepath/content/bindings.xml#FirePathStatusBar");
-moz-appearance: statusbar;
min-height:24px;
}
-/**** xPathBar *****/
-.xpath-textbox {
- -moz-binding: url("chrome://firexpath/content/bindings.xml#xPath-textbox");
+/**** FirePathBar *****/
+.firepath-textbox {
+ -moz-binding: url("chrome://firepath/content/bindings.xml#FirePath-textbox");
-moz-appearance: none;
border: none;
margin: 0;
}
-.xpath-textbox[status = "error"] {
+.firepath-textbox[status = "error"] {
background-color: #FF6666;
color: #FFFFFF;
}
-.xpath-textbox[status = "warning"] {
+.firepath-textbox[status = "warning"] {
background-color: yellow;
}
-.xpath-field-container {
+.firepath-field-container {
-moz-appearance: textfield;
}
-/**** xPathStatusBar *****/
-.xpath-result-icon[status = "error"] {
+/**** FirePathStatusBar *****/
+.firepath-result-icon[status = "error"] {
list-style-image: url("chrome://firebug/skin/errorIcon.png");
}
-.xpath-result-icon[status = "warning"] {
+.firepath-result-icon[status = "warning"] {
list-style-image: url("chrome://firebug/skin/warningIcon.png");
}
-.xpath-result-icon[status = "ok"] {
+.firepath-result-icon[status = "ok"] {
list-style-image: url("chrome://firebug/skin/okIcon-sm.png");
}
-.cancel-xpath-result-loading-button {
+.firepath-cancel-result-loading-button {
height:20px;
width:20px;
padding:2px;
diff --git a/skin/classic/xPathPanel.css b/skin/classic/FirePathPanel.css
similarity index 77%
rename from skin/classic/xPathPanel.css
rename to skin/classic/FirePathPanel.css
index 810c02b..4cea763 100644
--- a/skin/classic/xPathPanel.css
+++ b/skin/classic/FirePathPanel.css
@@ -1,20 +1,20 @@
/*
- * Copyright (C) 2009 Pierre Tholence, DB4ALL
+ * Copyright (C) 2009 - 2010 Pierre Tholence
*
- * This file is part of FireXPath
+ * This file is part of FirePath
*
- * FireXPath is free software: you can redistribute it and/or modify
+ * FirePath is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * FireXPath is distributed in the hope that it will be useful,
+ * FirePath is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with FireXPath. If not, see <http://www.gnu.org/licenses/>.
+ * along with FirePath. If not, see <http://www.gnu.org/licenses/>.
*/
.nodeBox.selected > .nodeLabel > .nodeLabelBox > .nodeAttr.selected,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/firexpath.git
More information about the Pkg-mozext-commits
mailing list