- }
-
- var nodeContents = nodeElement.contents(),
- contents = [];
- nodeContents.forEach(function(child) {
- if(child.getText) {
- var text = child.getText();
- if(!text)
- text = '<pusty tekst>';
- else {
- if(text.length > 13) {
- text = text.substr(0,13) + '...';
+ this.currentNodeElement = nodeElement;
+ items = [];
+ nodeElementParent = nodeElement.parent();
+
+ if(nodeElementParent) {
+ items.push(nodeElementParent);
+ parent = {
+ id: items.length - 1,
+ repr: wlxmlUtils.getTagLabel(nodeElementParent.getTagName()) + (nodeElementParent.getClass() ? ' / ' + wlxmlUtils.getClassLabel(nodeElementParent.getClass()) : '')
+ };
+
+ }
+
+ var nodeContents = nodeElement.contents();
+ nodeContents.forEach(function(child) {
+ if(child.getText) {
+ var text = child.getText();
+ if(!text) {
+ text = '<pusty tekst>';
+ }
+ else {
+ if(text.length > 13) {
+ text = text.substr(0,13) + '...';
+ }
+ text = '"' + text + '"';