From 1dcf69f7caa40430482c79f46c5478f84f6afc0a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Aleksander=20=C5=81ukasz?= Date: Thu, 25 Apr 2013 21:20:00 +0200 Subject: [PATCH] Visual editor - handling root wlxml element in navigation table --- modules/visualEditor.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/visualEditor.js b/modules/visualEditor.js index dfa8335..a607d86 100644 --- a/modules/visualEditor.js +++ b/modules/visualEditor.js @@ -283,10 +283,10 @@ rng.modules.visualEditor = function(sandbox) { var pane = this.node.find('#rng-visualEditor-edit'); pane.html( $(sandbox.getTemplate('editPane')({tag: node.attr('wlxml-tag'), klass: node.attr('wlxml-class')}))); - var parent = { + var parent = node.parent('[wlxml-tag]').length ? { repr: node.parent().attr('wlxml-tag') + ' / ' + (node.parent().attr('wlxml-class') || '[[no class]]'), id: node.parent().attr('id') - } + } : undefined; var children = []; node.children('[wlxml-tag]').each(function() { var child = $(this); -- 2.20.1