define([
'libs/jquery-1.9.1.min',
'libs/underscore-min',
-'libs/text!./template.html'], function($, _, templateSrc) {
+'utils/wlxml',
+'libs/text!./template.html'], function($, _, wlxmlUtils, templateSrc) {
'use strict';
this.dom.empty();
this.currentNodeElement = nodeElement;
var parents = nodeElement.parents();
- this.dom.html(template({node: nodeElement, parents: parents}));
+ this.dom.html(template({node: nodeElement, parents: parents, tagNames: wlxmlUtils.wlxmlTagNames, classNames: wlxmlUtils.wlxmlClassNames}));
this.dom.find('li > a[href="#"]').each(function(idx, a) {
$(a).data('element', parents[parents.length - 1 - idx]);
<ul class="breadcrumb">
<% if(node && parents) { %>
<% for(var i = parents.length - 1; i >= 0; i--) { %>
- <li><a href="#"> <%= parents[i].getWlxmlTag() %><% if(parents[i].getWlxmlClass()) { %>.<%= parents[i].getWlxmlClass() %> <% } %></a><span class="divider">/</span></li>
+ <li><a href="#"> <%= tagNames[parents[i].getWlxmlTag()] %><% if(parents[i].getWlxmlClass()) { %>.<%= classNames[parents[i].getWlxmlClass()] %> <% } %></a><span class="divider">/</span></li>
<% } %>
- <li class="active"><%= node.getWlxmlTag() %><% if(node.getWlxmlClass()) { %>.<%= node.getWlxmlClass() %> <% } %></span></li>
+ <li class="active"><%= tagNames[node.getWlxmlTag()] %><% if(node.getWlxmlClass()) { %>.<%= classNames[node.getWlxmlClass()] %> <% } %></span></li>
<% } %>
</ul>
</div>
\ No newline at end of file
define([
'libs/jquery-1.9.1.min',
'libs/underscore-min',
+'utils/wlxml',
'libs/text!./template.html'
-], function($, _, templateSrc) {
+], function($, _, wlxmlUtils, templateSrc) {
'use strict';
if(nodeElementParent) {
parent = {
- repr: nodeElementParent.getWlxmlTag() + (nodeElementParent.getWlxmlClass() ? ' / ' + nodeElementParent.getWlxmlClass() : '')
+ repr: wlxmlUtils.wlxmlTagNames[nodeElementParent.getWlxmlTag()] + (nodeElementParent.getWlxmlClass() ? ' / ' + wlxmlUtils.wlxmlClassNames[nodeElementParent.getWlxmlClass()] : '')
};
}
}
children.push({repr: _.escape(text), bold: child.sameNode(textElement)});
} else {
- children.push({repr: child.getWlxmlTag() + (child.getWlxmlClass() ? ' / ' + child.getWlxmlClass() : '')});
+ children.push({repr: wlxmlUtils.wlxmlTagNames[child.getWlxmlTag()] + (child.getWlxmlClass() ? ' / ' + wlxmlUtils.wlxmlClassNames[child.getWlxmlClass()] : '')});
}
});
this.dom.empty();