X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/c9ec6d3adaf0d2119ed2ef7eecc2e5b525f2f86d..a9da2ddb356fb313c1a5b45b073eec2c5a282649:/modules/visualEditor.js?ds=sidebyside diff --git a/modules/visualEditor.js b/modules/visualEditor.js index 39859a8..82ee13e 100644 --- a/modules/visualEditor.js +++ b/modules/visualEditor.js @@ -179,6 +179,9 @@ rng.modules.visualEditor = function(sandbox) { toggleGrid: function(toggle) { this.node.find('[wlxml-tag]').toggleClass('rng-hover', toggle); this.gridToggled = toggle; + }, + toggleTags: function(toggle) { + } }; @@ -258,7 +261,7 @@ rng.modules.visualEditor = function(sandbox) { id: node.parent().attr('id') } var children = []; - node.children().each(function() { + node.children('[wlxml-tag]').each(function() { var child = $(this); children.push({repr: child.attr('wlxml-tag') + ' / ' + (child.attr('wlxml-class') || '[[no class]]'), id: child.attr('id')}); }); @@ -317,6 +320,8 @@ rng.modules.visualEditor = function(sandbox) { toolbarButtonToggled: function(btn, toggle) { if(btn === 'grid') view.toggleGrid(toggle); + if(btn === 'tags') + view.toggleTags(toggle); }, nodeHovered: function(node) { view.highlightNode(node);